Refactored menu working
This commit is contained in:
@@ -70,9 +70,10 @@ uint32_t systemTime = 0; // 10mS ticks
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
|
||||
#define TIMER_SCALE 10
|
||||
void ctimer_match0_callback(uint32_t flags) // ISR every 10mS
|
||||
{
|
||||
int timerScaler = 0;
|
||||
static bool Test_Flg = false;
|
||||
if(Test_Flg)
|
||||
GPIO_PinWrite(GPIO, 0, 4, 1); //TODO remove
|
||||
@@ -81,12 +82,14 @@ void ctimer_match0_callback(uint32_t flags) // ISR every 10mS
|
||||
|
||||
Test_Flg ^=1;
|
||||
|
||||
// Sys_Timer = 1000000;
|
||||
// it goes here
|
||||
systemTime++; // increment system time by 10mS
|
||||
|
||||
Check_Live_Voltage();
|
||||
|
||||
systemTime += 10; // increment system time by 10mS
|
||||
if ((systemTime % TIMER_SCALE != 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Sys_Timer > 0)
|
||||
Sys_Timer--;
|
||||
@@ -111,9 +114,6 @@ void ctimer_match0_callback(uint32_t flags) // ISR every 10mS
|
||||
if(Key_Lock_Out_tmr > 0)
|
||||
Key_Lock_Out_tmr--;
|
||||
|
||||
KEY_Update();
|
||||
|
||||
Tx_TimeOut(); // Check main transmitter timer
|
||||
|
||||
if( Port_timer > 0)
|
||||
Port_timer--; // Port checking timer
|
||||
@@ -159,7 +159,7 @@ uint8_t i;
|
||||
/* Configuration 0 */
|
||||
matchConfig0.enableCounterReset = true;
|
||||
matchConfig0.enableCounterStop = false;
|
||||
matchConfig0.matchValue = 1500000;//150MHz clock 10mS period
|
||||
matchConfig0.matchValue = 150000;//150MHz clock 10mS period
|
||||
matchConfig0.enableInterrupt = true;
|
||||
|
||||
CTIMER_RegisterCallBack(CTIMER, &ctimer_callback_table[0], kCTIMER_MultipleCallback);
|
||||
@@ -210,7 +210,7 @@ void tmr_ChangeAutoSDTimer(void)
|
||||
tmr.autoShutdown = (AUTO_SHUTDOWN_t)0;
|
||||
}
|
||||
|
||||
Tx_timer = TX_TIME[i]; // reload the timer
|
||||
Tx_timer = TX_TIME[tmr.autoShutdown]; // reload the timer
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user