Function gx_hal_timer_start_count

  • Defined in file__output_copyinclude_src_include_timer_gx_hal_timer.h

Function Documentation

hal_status gx_hal_timer_start_count(GX_HAL_TIMER *dev, GX_HAL_TIMER_MODE mode, uint32_t period_ns)

启动定时器,模式为定时器模式

参数
  • dev – 定时器设备句柄

  • mode – 定时器模式, 详细请参看 docref GX_HAL_TIMER_MODE

  • period_ns – 定时器周期。 period_ns 和 rate 相关,如果 rate 配置成 1us period_ns 配置成1000, 则1ms后产生中断 period_ns 参数只有在 GX_HAL_TIMER_MODE_ONESHOT、GX_HAL_TIMER_MODE_PERIOD 模式下才生效

Returns HAL_OK

成功

Returns HAL_ERROR

失败

返回

hal_status 是否成功