blob: 447820d6f99e8f5d224660448d8c0fa010c384bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#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
|