bl_mcu_sdk/drivers/lhal/include/bflb_mtimer.h
jzlv a77b0dc866 [update][lhal] update lhal
* update lhal api comments
* add cam driver
* add efuse driver
* add iso11898 driver
2022-12-21 20:20:40 +08:00

74 lines
No EOL
1 KiB
C

#ifndef _BFLB_MTIMER_H
#define _BFLB_MTIMER_H
#include "stdint.h"
#include "stdio.h"
/** @addtogroup LHAL
* @{
*/
/** @addtogroup MTIMER
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Config mtimer interrupt.
*
* @param [in] ticks ticks to invoke interrupt.
* @param [in] interruptfun interrupt callback
*/
void bflb_mtimer_config(uint64_t ticks, void (*interruptfun)(void));
/**
* @brief Get mtimer current frequence.
*
* @return frequence
*/
uint32_t bflb_mtimer_get_freq(void);
/**
* @brief Mtimer delay with ms.
*
* @param [in] time delay time
*/
void bflb_mtimer_delay_ms(uint32_t time);
/**
* @brief Mtimer delay with us.
*
* @param [in] time delay time
*/
void bflb_mtimer_delay_us(uint32_t time);
/**
* @brief Get current mtimer time with us.
*
* @return time with us
*/
uint64_t bflb_mtimer_get_time_us();
/**
* @brief Get current mtimer time with ms.
*
* @return time with ms
*/
uint64_t bflb_mtimer_get_time_ms();
#ifdef __cplusplus
}
#endif
/**
* @}
*/
/**
* @}
*/
#endif