Fixes #1964 and possibly #1963: TIM13 was used bootloader and delays.c, lcdInitFinish() was missing from lcdSetRefVolt(), simplified LCD init interface for Taranis, delaysInit() was missing from Bootloader
This commit is contained in:
@@ -281,28 +281,6 @@ extern "C" void TIM8_TRG_COM_TIM14_IRQHandler()
|
||||
TIM14->SR &= ~TIM_SR_UIF;
|
||||
interrupt10ms();
|
||||
}
|
||||
|
||||
void init_hw_timer()
|
||||
{
|
||||
// Timer13
|
||||
RCC->APB1ENR |= RCC_APB1ENR_TIM13EN; // Enable clock
|
||||
TIM13->ARR = 65535;
|
||||
TIM13->PSC = (PERI1_FREQUENCY * TIMER_MULT_APB1) / 10000000 - 1;// 0.1uS from 12MHz
|
||||
TIM13->CCER = 0;
|
||||
TIM13->CCMR1 = 0;
|
||||
TIM13->EGR = 0;
|
||||
TIM13->CR1 = 1;
|
||||
}
|
||||
|
||||
// delay in units of 0.1 uS up to 6.5535 mS
|
||||
void hw_delay(uint16_t time)
|
||||
{
|
||||
TIM13->CNT = 0;
|
||||
TIM13->EGR = 1; // Re-start counter
|
||||
while ( TIM13->CNT < time) {
|
||||
// wait
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
FRESULT readBinDir(DIR *dj, FILINFO *fno)
|
||||
@@ -507,13 +485,9 @@ int main()
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
init_hw_timer(); //needed for lcdInitxxx()
|
||||
lcdInitStart();
|
||||
//nothing to do here
|
||||
lcdInitFinish();
|
||||
#else
|
||||
lcdInit();
|
||||
delaysInit(); //needed for lcdInit()
|
||||
#endif
|
||||
lcdInit();
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
extern uint8_t OptrexDisplay;
|
||||
|
||||
Reference in New Issue
Block a user