Commit 6d05f8ed authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

dev/syscon.c: don't reinit the timer every time delay() function is called

parent e86ca5d1
......@@ -8,10 +8,11 @@ struct s_i2c_if i2c_if[2] = { {SYSC_GPSR_FMC_SCL, SYSC_GPSR_FMC_SDA},
***************************/
void timer_init(uint32_t enable)
{
mprintf("MEMSIZE %x\n", syscon->HWFR & 0xf);
if(enable)
syscon->TCR |= SYSC_TCR_ENABLE;
else
syscon->TCR &= !SYSC_TCR_ENABLE;
syscon->TCR &= ~SYSC_TCR_ENABLE;
}
uint32_t timer_get_tics()
......@@ -23,7 +24,7 @@ void timer_delay(uint32_t how_long)
{
uint32_t t_start;
timer_init(1);
// timer_init(1);
do
{
t_start = timer_get_tics();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment