Skip to content
Snippets Groups Projects
Commit b43f20b5 authored by Jeff Gough's avatar Jeff Gough
Browse files

Ran code-format.sh

parent 4b77f64c
No related branches found
No related tags found
No related merge requests found
Pipeline #2949 passed
...@@ -98,7 +98,7 @@ int main(void) ...@@ -98,7 +98,7 @@ int main(void)
} }
/* Watchdog petting */ /* Watchdog petting */
watchdog_clearer_init(); watchdog_clearer_init();
LOG_DEBUG("startup", "Starting FreeRTOS ..."); LOG_DEBUG("startup", "Starting FreeRTOS ...");
vTaskStartScheduler(); vTaskStartScheduler();
......
...@@ -35,15 +35,15 @@ int hardware_early_init(void) ...@@ -35,15 +35,15 @@ int hardware_early_init(void)
sys_cfg_wdt_t wdt_cfg = NULL; sys_cfg_wdt_t wdt_cfg = NULL;
WDT_Init(MXC_WDT0, wdt_cfg); WDT_Init(MXC_WDT0, wdt_cfg);
if(WDT_GetResetFlag(MXC_WDT0)) { if (WDT_GetResetFlag(MXC_WDT0)) {
WDT_ClearResetFlag(MXC_WDT0); WDT_ClearResetFlag(MXC_WDT0);
LOG_INFO("watchdog", "Reset due to watchdog timeout"); LOG_INFO("watchdog", "Reset due to watchdog timeout");
} }
WDT_Enable(MXC_WDT0, 1); WDT_Enable(MXC_WDT0, 1);
WDT_SetResetPeriod( WDT_SetResetPeriod(
MXC_WDT0, MXC_WDT0,
WDT_PERIOD_2_27); /* Clocked by PCLK at 50MHz, reset at 2^27 ticks = 2.7 seconds */ WDT_PERIOD_2_27); /* Clocked by PCLK at 50MHz, reset at 2^27 ticks = 2.7 seconds */
WDT_EnableReset(MXC_WDT0, 1); WDT_EnableReset(MXC_WDT0, 1);
/* /*
......
...@@ -11,20 +11,19 @@ static StaticTimer_t clearer_timer_buffer; ...@@ -11,20 +11,19 @@ static StaticTimer_t clearer_timer_buffer;
static void watchdog_clearer_callback() static void watchdog_clearer_callback()
{ {
LOG_INFO("watchdog", "bees"); LOG_INFO("watchdog", "bees");
WDT_ResetTimer(MXC_WDT0); WDT_ResetTimer(MXC_WDT0);
} }
void watchdog_clearer_init() void watchdog_clearer_init()
{ {
clearer_timer = xTimerCreateStatic( clearer_timer = xTimerCreateStatic(
"watchdog_clearer_timer", "watchdog_clearer_timer",
CLEAR_PERIOD, CLEAR_PERIOD,
pdTRUE, pdTRUE,
NULL, NULL,
watchdog_clearer_callback, watchdog_clearer_callback,
&clearer_timer_buffer &clearer_timer_buffer
); );
xTimerStart(clearer_timer, 0); xTimerStart(clearer_timer, 0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment