[raspi] auto formatted

This commit is contained in:
Meco Man
2021-03-14 12:58:10 +08:00
parent c3ffe18688
commit 1af9bbce32
103 changed files with 325 additions and 325 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006-2019, RT-Thread Development Team
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -27,24 +27,24 @@ static rt_err_t raspi_systimer_start(rt_hwtimer_t *hwtimer, rt_uint32_t cnt, rt_
if (mode == HWTIMER_MODE_PERIOD)
timer->cnt = cnt;
else
timer->cnt = 0;
timer->cnt = 0;
__sync_synchronize();
if (timer_id == 1)
{
rt_hw_interrupt_umask(IRQ_SYSTEM_TIMER_1);
STIMER_C1 = STIMER_CLO + cnt;
}
}
else if (timer_id == 3)
{
rt_hw_interrupt_umask(IRQ_SYSTEM_TIMER_3);
STIMER_C3 = STIMER_CLO + cnt;
}
else
else
result = -RT_ERROR;
__sync_synchronize();
return result;
}
@@ -56,7 +56,7 @@ static void raspi_systimer_stop(rt_hwtimer_t *hwtimer)
rt_hw_interrupt_mask(IRQ_SYSTEM_TIMER_1);
else if (timer_id == 3)
rt_hw_interrupt_mask(IRQ_SYSTEM_TIMER_3);
}
static rt_err_t raspi_systimer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)
@@ -75,7 +75,7 @@ static rt_err_t raspi_systimer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *
void rt_device_systimer_isr(int vector, void *param)
{
rt_hwtimer_t *hwtimer = (rt_hwtimer_t *) param;
rt_systimer_t *timer = (rt_systimer_t *)hwtimer->parent.user_data;
RT_ASSERT(timer != RT_NULL);
@@ -86,18 +86,18 @@ void rt_device_systimer_isr(int vector, void *param)
if (timer_id == 1)
{
STIMER_CS = 0x2;
STIMER_C1 = STIMER_CLO + timer->cnt;
}
STIMER_C1 = STIMER_CLO + timer->cnt;
}
else if (timer_id == 3)
{
STIMER_CS = 0x8;
STIMER_C3 = STIMER_CLO + timer->cnt;
STIMER_C3 = STIMER_CLO + timer->cnt;
}
__sync_synchronize();
rt_device_hwtimer_isr(hwtimer);
}
static struct rt_hwtimer_device _hwtimer1;
static struct rt_hwtimer_device _hwtimer3;