[Taranis] SWR implemented with popup when SWR > 0x33 (Tx antenna problem)
[Taranis] RSSI/A1/A2 alarms [Taranis] Better code when no pulses sent (internal or external module). Thanks Mike! [Taranis] Correction on DEBUG serial code
This commit is contained in:
@@ -758,8 +758,8 @@ void usbBootloader()
|
||||
PWM->PWM_DIS = PWM_DIS_CHID0 | PWM_DIS_CHID1 | PWM_DIS_CHID2 | PWM_DIS_CHID3 ; // Disable all
|
||||
NVIC_DisableIRQ(TC2_IRQn) ;
|
||||
|
||||
disable_main_ppm() ;
|
||||
disable_ppm2();
|
||||
disable_ppm(0);
|
||||
disable_ppm(1);
|
||||
|
||||
// PWM->PWM_IDR1 = PWM_IDR1_CHID3 ;
|
||||
// NVIC_DisableIRQ(PWM_IRQn) ;
|
||||
|
||||
@@ -162,13 +162,17 @@ extern uint32_t readKeys();
|
||||
#define DBLKEYS_PRESSED_LFT_DWN(i) ((in & (0x40 + 0x08)) == (0x40 + 0x08))
|
||||
|
||||
// Pulses driver
|
||||
#define init_no_pulses(port) init_main_ppm(3000, 0)
|
||||
#define disable_no_pulses(port) disable_ppm(0)
|
||||
void init_main_ppm(uint32_t period, uint32_t out_enable);
|
||||
void disable_main_ppm();
|
||||
void disable_ppm2();
|
||||
#define init_ppm(port) init_main_ppm(3000, 1)
|
||||
void disable_ppm(uint32_t port);
|
||||
void init_ssc();
|
||||
void disable_ssc();
|
||||
#define disable_pxx() disable_ssc()
|
||||
void setupPulsesPPM(unsigned int port);
|
||||
#define init_pxx(port) init_main_ppm(5000, 0); init_ssc()
|
||||
#define disable_pxx(port) disable_ssc()
|
||||
#define init_dsm2(port) init_main_ppm(5000, 0); init_ssc()
|
||||
#define disable_dsm2(port) disable_ssc()
|
||||
|
||||
// SD driver
|
||||
#if !defined(SIMU)
|
||||
|
||||
@@ -44,7 +44,7 @@ extern uint8_t Bit_pulses[64] ; // Likely more than we
|
||||
extern uint8_t Serial_byte_count ;
|
||||
|
||||
|
||||
void init_main_ppm( uint32_t period, uint32_t out_enable )
|
||||
void init_main_ppm(uint32_t period, uint32_t out_enable)
|
||||
{
|
||||
register Pio *pioptr ;
|
||||
register Pwm *pwmptr ;
|
||||
@@ -91,25 +91,22 @@ void init_main_ppm( uint32_t period, uint32_t out_enable )
|
||||
NVIC_EnableIRQ(PWM_IRQn) ;
|
||||
}
|
||||
|
||||
void disable_main_ppm()
|
||||
void disable_ppm(uint32_t port)
|
||||
{
|
||||
register Pio *pioptr ;
|
||||
|
||||
pioptr = PIOA ;
|
||||
pioptr->PIO_PER = PIO_PA17 ; // Assign A17 to PIO
|
||||
if (port == 0) {
|
||||
pioptr = PIOA ;
|
||||
pioptr->PIO_PER = PIO_PA17 ; // Assign A17 to PIO
|
||||
PWM->PWM_IDR1 = PWM_IDR1_CHID3 ;
|
||||
}
|
||||
else {
|
||||
pioptr = PIOC ;
|
||||
pioptr->PIO_PER = PIO_PC17 ; // Assign A17 to PIO
|
||||
|
||||
PWM->PWM_IDR1 = PWM_IDR1_CHID3 ;
|
||||
}
|
||||
|
||||
void disable_ppm2()
|
||||
{
|
||||
register Pio *pioptr ;
|
||||
|
||||
pioptr = PIOC ;
|
||||
pioptr->PIO_PER = PIO_PC17 ; // Assign A17 to PIO
|
||||
|
||||
PWM->PWM_IDR1 = PWM_IDR1_CHID1 ;
|
||||
NVIC_DisableIRQ(PWM_IRQn) ;
|
||||
PWM->PWM_IDR1 = PWM_IDR1_CHID1 ;
|
||||
NVIC_DisableIRQ(PWM_IRQn) ;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise the SSC to allow PXX output.
|
||||
|
||||
Reference in New Issue
Block a user