boards changes

This commit is contained in:
NIIBE Yutaka
2012-05-25 15:36:09 +09:00
parent 6b47ee56b8
commit 2113d5b751
8 changed files with 48 additions and 55 deletions

View File

@@ -15,21 +15,3 @@ hwinit1 (void)
{
hwinit1_common ();
}
void
USB_Cable_Config (FunctionalState NewState)
{
if (NewState != DISABLE)
palClearPad (IOPORT3, GPIOC_DISC);
else
palSetPad (IOPORT3, GPIOC_DISC);
}
void
set_led (int value)
{
if (value)
palClearPad (IOPORT3, GPIOC_LED);
else
palSetPad (IOPORT3, GPIOC_LED);
}

View File

@@ -30,6 +30,13 @@
/*
* Setup for the Olimex STM32-H103 proto board.
*/
#define SET_USB_CONDITION(en) (!en) /* To connect USB, call palClearPad */
#define SET_LED_CONDITION(on) (!on) /* To emit light, call palClearPad */
#define GPIO_USB GPIOC_DISC
#define IOPORT_USB GPIOC
#define GPIO_LED GPIOC_LED
#define IOPORT_LED GPIOC
#define FLASH_PAGE_SIZE 1024
/*
* Board identifier.