Added ST71x system timer logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1115 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
ddd0bea229
commit
a720f71ab8
@ -108,7 +108,7 @@ CONFIG_STR71X_BSPI1=n
|
||||
CONFIG_STR71X_HDLC=n
|
||||
CONFIG_STR71X_XTI=n
|
||||
CONFIG_STR71X_GPIO0=y
|
||||
CONFIG_STR71X_GPIO1=n
|
||||
CONFIG_STR71X_GPIO1=y
|
||||
CONFIG_STR71X_GPIO2=n
|
||||
CONFIG_STR71X_ADC12=n
|
||||
CONFIG_STR71X_CKOUT=n
|
||||
|
@ -82,15 +82,15 @@ void up_buttoninit(void)
|
||||
/* Configure the GPIO pins as inputs */
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC0);
|
||||
reg16 |= STR71X_BOTHBUTTONS_GPIO1
|
||||
reg16 |= STR71X_BOTHBUTTONS_GPIO1;
|
||||
putreg16(reg16, STR71X_GPIO1_PC0);
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC1);
|
||||
reg16 &= ~STR71X_BOTHBUTTONS_GPIO1
|
||||
reg16 &= ~STR71X_BOTHBUTTONS_GPIO1;
|
||||
putreg16(reg16, STR71X_GPIO1_PC1);
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC2);
|
||||
reg16 &= ~STR71X_BOTHBUTTONS_GPIO1
|
||||
reg16 &= ~STR71X_BOTHBUTTONS_GPIO1;
|
||||
putreg16(reg16, STR71X_GPIO1_PC2);
|
||||
}
|
||||
|
||||
|
@ -106,21 +106,21 @@ void up_ledinit(void)
|
||||
/* Set normal function output */
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC0);
|
||||
reg16 |= STR71X_LEDGPIO1_BITS
|
||||
reg16 |= STR71X_LEDGPIO1_BITS;
|
||||
putreg16(reg16, STR71X_GPIO1_PC0);
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC1);
|
||||
reg16 &= ~STR71X_LEDGPIO1_BITS
|
||||
reg16 &= ~STR71X_LEDGPIO1_BITS;
|
||||
putreg16(reg16, STR71X_GPIO1_PC1);
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PC2);
|
||||
reg16 |= STR71X_LEDGPIO1_BITS
|
||||
reg16 |= STR71X_LEDGPIO1_BITS;
|
||||
putreg16(reg16, STR71X_GPIO1_PC2);
|
||||
|
||||
/* Clear the LEDs (1 clears; 0 sets) */
|
||||
|
||||
reg16 = getreg16(STR71X_GPIO1_PD);
|
||||
reg16 |= STR71X_LEDGPIO1_BITS
|
||||
reg16 |= STR71X_LEDGPIO1_BITS;
|
||||
putreg16(reg16, STR71X_GPIO1_PD);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user