VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_rtc_tm_t |
struct | vsf_rtc_isr_t |
struct | vsf_rtc_cfg_t |
rtc configuration More... | |
struct | vsf_rtc_capability_t |
struct | vsf_rtc_op_t |
struct | vsf_rtc_t |
Typedefs | |
typedef enum vsf_rtc_irq_mask_t | vsf_rtc_irq_mask_t |
typedef VSF_RTC_CFG_TIME_TYPE | vsf_rtc_time_t |
typedef struct vsf_rtc_tm_t | vsf_rtc_tm_t |
typedef struct vsf_rtc_t | vsf_rtc_t |
typedef void | vsf_rtc_isr_handler_t(void *target_ptr, vsf_rtc_t *rtc_ptr, vsf_rtc_irq_mask_t irq_mask) |
typedef struct vsf_rtc_isr_t | vsf_rtc_isr_t |
typedef struct vsf_rtc_cfg_t | vsf_rtc_cfg_t |
rtc configuration | |
typedef struct vsf_rtc_capability_t | vsf_rtc_capability_t |
typedef struct vsf_rtc_op_t | vsf_rtc_op_t |
Enumerations | |
enum | vsf_rtc_irq_mask_t { VSF_RTC_IRQ_MASK_ALARM = (1 << 0) } |
enum | { VSF_RTC_IRQ_COUNT = 1 , VSF_RTC_IRQ_ALL_BITS_MASK = VSF_RTC_IRQ_MASK_ALARM } |
Functions | |
vsf_err_t | vsf_rtc_init (vsf_rtc_t *rtc_ptr, vsf_rtc_cfg_t *cfg_ptr) |
initialize a rtc instance. | |
void | vsf_rtc_fini (vsf_rtc_t *rtc_ptr) |
finalize a rtc instance. | |
fsm_rt_t | vsf_rtc_enable (vsf_rtc_t *rtc_ptr) |
enable interrupt masks of rtc instance. | |
fsm_rt_t | vsf_rtc_disable (vsf_rtc_t *rtc_ptr) |
disable interrupt masks of rtc instance. | |
vsf_rtc_capability_t | vsf_rtc_capability (vsf_rtc_t *rtc_ptr) |
get the capability of rtc instance. | |
vsf_err_t | vsf_rtc_get (vsf_rtc_t *rtc_ptr, vsf_rtc_tm_t *rtc_tm) |
get rtc date time | |
vsf_err_t | vsf_rtc_set (vsf_rtc_t *rtc_ptr, const vsf_rtc_tm_t *rtc_tm) |
set rtc date time | |
vsf_err_t | vsf_rtc_get_time (vsf_rtc_t *rtc_ptr, vsf_rtc_time_t *second_ptr, vsf_rtc_time_t *millisecond_ptr) |
get rtc second and milli second of unix time | |
vsf_err_t | vsf_rtc_set_time (vsf_rtc_t *rtc_ptr, vsf_rtc_time_t second, vsf_rtc_time_t millisecond) |
set rtc date time | |
#define VSF_RTC_CFG_MULTI_CLASS ENABLED |
#define VSF_RTC_CFG_PREFIX vsf |
#define VSF_RTC_CFG_FUNCTION_RENAME ENABLED |
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
#define VSF_RTC_CFG_TIME_TYPE uint64_t |
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Redefine struct vsf_rtc_cfg_t. The vsf_rtc_isr_handler_t type also needs to be redefined For compatibility, members should not be deleted when struct vsf_rtc_cfg_t redefining.
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Redefine struct vsf_rtc_capability_t. For compatibility, members should not be deleted when struct vsf_rtc_capability_t redefining.
#define VSF_RTC_CFG_INHERT_HAL_CAPABILITY ENABLED |
#define VSF_RTC_APIS | ( | __prefix_name | ) |
#define __VSF_HAL_TEMPLATE_API VSF_HAL_TEMPLATE_API_FP |
#define __vsf_rtc_t VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_t) |
#define vsf_rtc_init | ( | __RTC, | |
... | |||
) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_init) ((__vsf_rtc_t *)(__RTC), ##__VA_ARGS__) |
#define vsf_rtc_enable | ( | __RTC | ) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_enable) ((__vsf_rtc_t *)(__RTC)) |
#define vsf_rtc_disable | ( | __RTC | ) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_disable) ((__vsf_rtc_t *)(__RTC)) |
#define vsf_rtc_capability | ( | __RTC | ) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_capability) ((__vsf_rtc_t *)(__RTC)) |
#define vsf_rtc_get | ( | __RTC, | |
... | |||
) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_get) ((__vsf_rtc_t *)(__RTC), ##__VA_ARGS__) |
#define vsf_rtc_set | ( | __RTC, | |
... | |||
) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_set) ((__vsf_rtc_t *)(__RTC), ##__VA_ARGS__) |
#define vsf_rtc_get_time | ( | __RTC, | |
... | |||
) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_get_time) ((__vsf_rtc_t *)(__RTC), ##__VA_ARGS__) |
#define vsf_rtc_set_time | ( | __RTC, | |
... | |||
) | VSF_MCONNECT(VSF_RTC_CFG_PREFIX, _rtc_set_time) ((__vsf_rtc_t *)(__RTC), ##__VA_ARGS__) |
typedef enum vsf_rtc_irq_mask_t vsf_rtc_irq_mask_t |
typedef VSF_RTC_CFG_TIME_TYPE vsf_rtc_time_t |
typedef struct vsf_rtc_tm_t vsf_rtc_tm_t |
typedef void vsf_rtc_isr_handler_t(void *target_ptr, vsf_rtc_t *rtc_ptr, vsf_rtc_irq_mask_t irq_mask) |
typedef struct vsf_rtc_isr_t vsf_rtc_isr_t |
typedef struct vsf_rtc_cfg_t vsf_rtc_cfg_t |
rtc configuration
typedef struct vsf_rtc_capability_t vsf_rtc_capability_t |
typedef struct vsf_rtc_op_t vsf_rtc_op_t |
enum vsf_rtc_irq_mask_t |
|
extern |
initialize a rtc instance.
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | cfg_ptr | a pointer to structure vsf_rtc_cfg_t |
|
extern |
enable interrupt masks of rtc instance.
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | irq_mask | one or more value of enum vsf_rtc_irq_mask_t |
disable interrupt masks of rtc instance.
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | irq_mask | one or more value of enum vsf_rtc_irq_mask_t, vsf_rtc_irq_mask_t |
|
extern |
get the capability of rtc instance.
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
|
extern |
get rtc date time
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | rtc_tm | a pointer to structure vsf_rtc_tm_t |
|
extern |
set rtc date time
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | rtc_tm | a pointer to structure vsf_rtc_tm_t |
|
extern |
get rtc second and milli second of unix time
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | second_ptr | a pointer to type vsf_rtc_time_t |
[in] | millisecond_ptr | a pointer to type vsf_rtc_time_t |
[in] | rtc_ptr | rtc instance |
[out] | rtc | data time |
|
extern |
set rtc date time
[in] | rtc_ptr | a pointer to structure vsf_rtc_t |
[in] | rtc_tm | a pointer to structure vsf_rtc_tm_t |