ESP8266_RTOS_SDK  v1.4.0
Functions
Hardware timer APIs

Hardware timer APIs. More...

Functions

void hw_timer_init (uint8 req)
 Initialize the hardware ISR timer. More...
 
void hw_timer_arm (uint32 val)
 Set a trigger timer delay to enable this timer. More...
 
void hw_timer_set_func (void(*user_hw_timer_cb_set)(void))
 Set timer callback function. More...
 

Detailed Description

Hardware timer APIs.

Attention
Hardware timer can not interrupt other ISRs.

Function Documentation

void hw_timer_arm ( uint32  val)

Set a trigger timer delay to enable this timer.

Parameters
uint32val : Timing
  • In autoload mode, range : 50 ~ 0x7fffff
  • In non-autoload mode, range : 10 ~ 0x7fffff
Returns
null
void hw_timer_init ( uint8  req)

Initialize the hardware ISR timer.

Parameters
uint8req : 0, not autoload; 1, autoload mode.
Returns
null
void hw_timer_set_func ( void(*)(void)  user_hw_timer_cb_set)

Set timer callback function.

For enabled timer, timer callback has to be set.

Parameters
uint32val : Timing
  • In autoload mode, range : 50 ~ 0x7fffff
  • In non-autoload mode, range : 10 ~ 0x7fffff
Returns
null