ab32vg1_hal.c 511 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "ab32vg1_hal.h"
  2. static uint32_t hw_ticks = 0;
  3. static void (*tick_cfg_hook)(uint32_t ticks) = HAL_NULL;
  4. void hal_set_tick_hook(void (*hook)(uint32_t ticks))
  5. {
  6. tick_cfg_hook = hook;
  7. }
  8. void hal_set_ticks(uint32_t ticks)
  9. {
  10. if (ticks != hw_ticks)
  11. {
  12. hw_ticks = ticks;
  13. }
  14. if (tick_cfg_hook != HAL_NULL)
  15. {
  16. tick_cfg_hook(hw_ticks);
  17. }
  18. }
  19. WEAK void hal_mdelay(uint32_t nms)
  20. {
  21. }
  22. WEAK void hal_udelay(uint32_t nus)
  23. {
  24. }
  25. WEAK void hal_printf(const char *fmt, ...)
  26. {
  27. }