[English]

Timer

Timer API Reference

Functions

OSStatus bk_timer_initialize(uint8_t timer_id, uint32_t time_ms, void *callback)

Initialises a timer and start.

备注

user can user timer0 timer1 timer2 timer4 timer5

参数
  • timer_id – : the timer id

  • time_ms – : time value(unit:ms)

  • callback – : callback

返回

  • kNoErr : on success.

  • kGeneralErr : if an error occurred with any step

OSStatus bk_timer_stop(uint8_t timer_id)

stop timer

备注

user can user timer0 timer1 timer2 timer4 timer5

参数

timer_id – : the timer id

返回

  • kNoErr : on success.

  • kGeneralErr : if an error occurred with any step

UINT32 bk_get_timer_cnt(uint8_t timer_id)

Macros

BKDRIVERTIMRE_TEST_DEMO