support DFU board

This commit is contained in:
NIIBE Yutaka
2012-05-29 08:37:36 +09:00
parent 1576b8303e
commit 8d8e67f1ad
8 changed files with 44 additions and 81 deletions

View File

@@ -9,23 +9,3 @@ hwinit1 (void)
{
hwinit1_common ();
}
void
USB_Cable_Config (FunctionalState NewState)
{
/* CQ STARM has no functionality to stop USB. */
/*
* It seems that users can add the functionality with USB_DC (PD9)
* though
*/
(void)NewState;
}
void
set_led (int value)
{
if (value)
palSetPad (IOPORT3, GPIOC_LED);
else
palClearPad (IOPORT3, GPIOC_LED);
}

View File

@@ -30,6 +30,11 @@
/*
* Setup for the CQ STARM board.
*/
#undef SET_USB_CONDITION /* No functionality to disconnect USB */
#define SET_LED_CONDITION(on) on /* To emit light, call palSetPad */
#define GPIO_LED GPIOC_LED
#define IOPORT_LED GPIOC
#define FLASH_PAGE_SIZE 1024
/*
* Board identifier.

View File

@@ -42,24 +42,6 @@ hwinit1 (void)
#endif
}
void
USB_Cable_Config (int NewState)
{
if (NewState != DISABLE)
palSetPad (IOPORT1, GPIOA_USB_ENABLE);
else
palClearPad (IOPORT1, GPIOA_USB_ENABLE);
}
void
set_led (int value)
{
if (value)
palSetPad (IOPORT2, GPIOB_LED);
else
palClearPad (IOPORT2, GPIOB_LED);
}
#if defined(PINPAD_CIR_SUPPORT)
void
cir_ext_disable (void)

View File

@@ -64,24 +64,6 @@ hwinit1 (void)
#endif
}
void
USB_Cable_Config (FunctionalState NewState)
{
if (NewState != DISABLE)
palClearPad (IOPORT4, GPIOD_USB_ENABLE);
else
palSetPad (IOPORT4, GPIOD_USB_ENABLE);
}
void
set_led (int value)
{
if (value)
palClearPad (IOPORT4, GPIOD_LED1);
else
palSetPad (IOPORT4, GPIOD_LED1);
}
#if defined(PINPAD_CIR_SUPPORT)
void
cir_ext_disable (void)

View File

@@ -31,6 +31,13 @@
/*
* Setup for the STBee 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 GPIOD_USB_ENABLE
#define IOPORT_USB GPIOD
#define GPIO_LED GPIOD_LED1
#define IOPORT_LED GPIOD
#define FLASH_PAGE_SIZE 2048
/*
* Board identifier.

View File

@@ -77,24 +77,6 @@ hwinit1 (void)
palSetPad (IOPORT1, GPIOA_LED2);
}
void
USB_Cable_Config (FunctionalState NewState)
{
if (NewState != DISABLE)
palSetPad (IOPORT1, GPIOA_USB_ENABLE);
else
palClearPad (IOPORT1, GPIOA_USB_ENABLE);
}
void
set_led (int value)
{
if (value)
palClearPad (IOPORT1, GPIOA_LED1);
else
palSetPad (IOPORT1, GPIOA_LED1);
}
#if defined(PINPAD_CIR_SUPPORT)
void
cir_ext_disable (void)

View File

@@ -31,6 +31,13 @@
/*
* Setup for the STBee Mini board.
*/
#define SET_USB_CONDITION(en) (en) /* To connect USB, call palSetPad */
#define SET_LED_CONDITION(on) (!on) /* To emit light, call palClearPad */
#define GPIO_USB GPIOA_USB_ENABLE
#define IOPORT_USB GPIOA
#define GPIO_LED GPIOA_LED1
#define IOPORT_LED GPIOA
#define FLASH_PAGE_SIZE 1024
/*
* Board identifier.