[X9D] Reboot when changing the model
This commit is contained in:
@@ -145,17 +145,7 @@ extern "C" void TIM1_CC_IRQHandler()
|
||||
|
||||
setupPulses() ;
|
||||
|
||||
if (s_current_protocol == PROTO_PPM)
|
||||
{
|
||||
ppmStreamPtr = ppmStream ;
|
||||
|
||||
TIM1->DIER |= TIM_DIER_UDE ;
|
||||
|
||||
TIM1->SR &= ~TIM_SR_UIF ; // Clear this flag
|
||||
TIM1->DIER |= TIM_DIER_UIE ; // Enable this interrupt
|
||||
}
|
||||
else if (s_current_protocol == PROTO_PXX)
|
||||
{
|
||||
if (s_current_protocol == PROTO_PXX) {
|
||||
DMA2_Stream1->CR &= ~DMA_SxCR_EN ; // Disable DMA
|
||||
DMA2->LIFCR = DMA_LIFCR_CTCIF1 | DMA_LIFCR_CHTIF1 | DMA_LIFCR_CTEIF1 | DMA_LIFCR_CDMEIF1 | DMA_LIFCR_CFEIF1 ; // Write ones to clear bits
|
||||
DMA2_Stream1->M0AR = CONVERT_PTR(&pxxStream[1]);
|
||||
@@ -163,6 +153,14 @@ extern "C" void TIM1_CC_IRQHandler()
|
||||
TIM1->CCR1 = pxxStream[0] ;
|
||||
TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt
|
||||
}
|
||||
else {
|
||||
ppmStreamPtr = ppmStream ;
|
||||
|
||||
TIM1->DIER |= TIM_DIER_UDE ;
|
||||
|
||||
TIM1->SR &= ~TIM_SR_UIF ; // Clear this flag
|
||||
TIM1->DIER |= TIM_DIER_UIE ; // Enable this interrupt
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void TIM1_UP_TIM10_IRQHandler()
|
||||
|
||||
Reference in New Issue
Block a user