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:
patacongo 2008-11-01 16:12:09 +00:00
parent ddd0bea229
commit a720f71ab8
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}