@@ -498,16 +498,6 @@ void calcConsumption()
|
||||
}
|
||||
}
|
||||
|
||||
void checkTrainerSettings()
|
||||
{
|
||||
if (SLAVE_MODE()) {
|
||||
PIOC->PIO_PDR = PIO_PC22;
|
||||
}
|
||||
else {
|
||||
PIOC->PIO_PER = PIO_PC22;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t getBatteryVoltage()
|
||||
{
|
||||
int32_t instant_vbat = anaIn(TX_VOLTAGE); // using filtered ADC value on purpose
|
||||
|
||||
@@ -34,7 +34,6 @@ extern uint16_t ResetReason;
|
||||
#define FIRMWARE_ADDRESS 0x00400000
|
||||
|
||||
// Board driver
|
||||
void boardPreInit(void);
|
||||
void boardInit(void);
|
||||
#define boardOff() pwrOff()
|
||||
|
||||
@@ -212,8 +211,8 @@ void calcConsumption();
|
||||
// Trainer driver
|
||||
#define SLAVE_MODE() (pwrCheck() == e_power_trainer)
|
||||
#define TRAINER_CONNECTED() (PIOA->PIO_PDSR & PIO_PA8)
|
||||
void checkTrainerSettings();
|
||||
void init_trainer_capture();
|
||||
void stop_trainer_capture();
|
||||
|
||||
// Write Flash driver
|
||||
#define FLASH_PAGESIZE 256
|
||||
|
||||
@@ -82,14 +82,14 @@ extern "C" void TC3_IRQHandler() //capture ppm in at 2MHz
|
||||
|
||||
void init_trainer_capture()
|
||||
{
|
||||
PIOC->PIO_PER = PIO_PC22;
|
||||
start_timer4() ;
|
||||
start_timer3() ;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void stop_trainer_capture()
|
||||
{
|
||||
PIOC->PIO_PDR = PIO_PC22;
|
||||
TC1->TC_CHANNEL[0].TC_IDR = TC_IDR0_LDRAS ;
|
||||
NVIC_DisableIRQ(TC3_IRQn) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user