summaryrefslogtreecommitdiff
path: root/bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal.c
blob: dd796fd21be2b5b1e1506b4074bc6b118971a596 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "ab32vg1_hal.h"

static uint32_t hw_ticks = 0;

static void (*tick_cfg_hook)(uint32_t ticks) = HAL_NULL;

void hal_set_tick_hook(void (*hook)(uint32_t ticks))
{
    tick_cfg_hook = hook;
}

void hal_set_ticks(uint32_t ticks)
{
    if (ticks != hw_ticks)
    {
        hw_ticks = ticks;
    }
    if (tick_cfg_hook != HAL_NULL)
    {
        tick_cfg_hook(hw_ticks);
    }
}

WEAK void hal_mdelay(uint32_t nms)
{
}

WEAK void hal_udelay(uint32_t nus)
{
}

WEAK void hal_printf(const char *fmt, ...)
{
}