X10 sport connector support
This commit is contained in:
@@ -100,6 +100,29 @@ extern "C" void INTERRUPT_1MS_IRQHandler()
|
||||
extern "C" void initialise_monitor_handles();
|
||||
#endif
|
||||
|
||||
#if defined(PCBX10)
|
||||
void sportUpdateInit()
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
GPIO_InitStructure.GPIO_Pin = SPORT_UPDATE_PWR_GPIO_PIN;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
|
||||
GPIO_Init(SPORT_UPDATE_PWR_GPIO, &GPIO_InitStructure);
|
||||
}
|
||||
|
||||
void sportUpdatePowerOn()
|
||||
{
|
||||
GPIO_SetBits(SPORT_UPDATE_PWR_GPIO, SPORT_UPDATE_PWR_GPIO_PIN);
|
||||
}
|
||||
|
||||
void sportUpdatePowerOff()
|
||||
{
|
||||
GPIO_ResetBits(SPORT_UPDATE_PWR_GPIO, SPORT_UPDATE_PWR_GPIO_PIN);
|
||||
}
|
||||
#endif
|
||||
|
||||
void boardInit()
|
||||
{
|
||||
#if defined(SEMIHOSTING)
|
||||
@@ -125,6 +148,7 @@ void boardInit()
|
||||
INTMODULE_RCC_AHB1Periph |
|
||||
EXTMODULE_RCC_AHB1Periph |
|
||||
GPS_RCC_AHB1Periph |
|
||||
SPORT_UPDATE_RCC_AHB1Periph |
|
||||
BL_RCC_AHB1Periph,
|
||||
ENABLE);
|
||||
|
||||
@@ -196,6 +220,7 @@ void boardInit()
|
||||
|
||||
#if defined(PCBX10)
|
||||
ledInit();
|
||||
sportUpdateInit();
|
||||
#endif
|
||||
|
||||
ledBlue();
|
||||
|
||||
Reference in New Issue
Block a user