Cosmetics
This commit is contained in:
@@ -173,6 +173,10 @@ uint32_t isFirmwareStart(const void * buffer);
|
||||
uint32_t isBootloaderStart(const void * buffer);
|
||||
|
||||
// Pulses driver
|
||||
#define INTERNAL_MODULE_ON() GPIO_SetBits(GPIO_INT_RF_PWR, PIN_INT_RF_PWR)
|
||||
#define INTERNAL_MODULE_OFF() GPIO_ResetBits(GPIO_INT_RF_PWR, PIN_INT_RF_PWR)
|
||||
#define EXTERNAL_MODULE_ON() GPIO_SetBits(GPIO_EXT_RF_PWR, PIN_EXT_RF_PWR)
|
||||
#define EXTERNAL_MODULE_OFF() GPIO_ResetBits(GPIO_EXT_RF_PWR, PIN_EXT_RF_PWR)
|
||||
void init_no_pulses(uint32_t port);
|
||||
void disable_no_pulses(uint32_t port);
|
||||
void init_ppm( uint32_t module_index );
|
||||
@@ -238,10 +242,6 @@ void pwrInit(void);
|
||||
uint32_t pwrCheck(void);
|
||||
void pwrOff(void);
|
||||
#define UNEXPECTED_SHUTDOWN() (g_eeGeneral.unexpectedShutdown)
|
||||
#define INTERNAL_RF_ON() GPIO_SetBits(GPIO_INT_RF_PWR, PIN_INT_RF_PWR)
|
||||
#define INTERNAL_RF_OFF() GPIO_ResetBits(GPIO_INT_RF_PWR, PIN_INT_RF_PWR)
|
||||
#define EXTERNAL_MODULE_ON() GPIO_SetBits(GPIO_EXT_RF_PWR, PIN_EXT_RF_PWR)
|
||||
#define EXTERNAL_MODULE_OFF() GPIO_ResetBits(GPIO_EXT_RF_PWR, PIN_EXT_RF_PWR)
|
||||
|
||||
// Backlight driver
|
||||
#if defined(REVPLUS)
|
||||
|
||||
@@ -155,7 +155,7 @@ void disable_no_pulses(uint32_t port)
|
||||
|
||||
static void init_pa10_none()
|
||||
{
|
||||
INTERNAL_RF_OFF();
|
||||
INTERNAL_MODULE_OFF();
|
||||
|
||||
// Timer1, channel 3
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
@@ -243,7 +243,7 @@ static void disable_pa7_none()
|
||||
|
||||
static void init_pa10_pxx()
|
||||
{
|
||||
INTERNAL_RF_ON();
|
||||
INTERNAL_MODULE_ON();
|
||||
|
||||
// Timer1, channel 3
|
||||
setupPulsesPXX(INTERNAL_MODULE) ; // TODO not here!
|
||||
@@ -307,7 +307,7 @@ static void disable_pa10_pxx()
|
||||
NVIC_DisableIRQ(TIM1_CC_IRQn) ;
|
||||
TIM1->DIER &= ~TIM_DIER_CC2IE ;
|
||||
TIM1->CR1 &= ~TIM_CR1_CEN ;
|
||||
INTERNAL_RF_OFF();
|
||||
INTERNAL_MODULE_OFF();
|
||||
}
|
||||
|
||||
#if defined(TARANIS_INTERNAL_PPM)
|
||||
@@ -316,7 +316,7 @@ static void disable_pa10_pxx()
|
||||
// Pin is AF1 function for timer 1
|
||||
static void init_pa10_ppm()
|
||||
{
|
||||
INTERNAL_RF_ON();
|
||||
INTERNAL_MODULE_ON();
|
||||
// Timer1
|
||||
ppmStreamPtr[INTERNAL_MODULE] = ppmStream[INTERNAL_MODULE];
|
||||
|
||||
@@ -362,7 +362,7 @@ static void disable_pa10_ppm()
|
||||
TIM1->DIER &= ~TIM_DIER_CC2IE & ~TIM_DIER_UIE ;
|
||||
TIM1->CR1 &= ~TIM_CR1_CEN ;
|
||||
|
||||
INTERNAL_RF_OFF();
|
||||
INTERNAL_MODULE_OFF();
|
||||
}
|
||||
#endif // #if defined(TARANIS_INTERNAL_PPM)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user