VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_rtc_tm_t |
Time structure for RTC operations. Used to represent date and time information in a standardized format. More... | |
struct | vsf_rtc_isr_t |
RTC interrupt service routine configuration structure. More... | |
struct | vsf_rtc_cfg_t |
RTC configuration structure. More... | |
struct | vsf_rtc_capability_t |
RTC capability structure. Describes the features and capabilities supported by the RTC hardware. More... | |
struct | vsf_rtc_op_t |
RTC operation function pointer type, used for RTC Multi Class support. More... | |
struct | vsf_rtc_t |
RTC instance structure, used for RTC Multi Class support, not needed in non Multi Class mode. More... | |
Macros | |
#define | VSF_RTC_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability. | |
#define | VSF_RTC_CFG_PREFIX vsf |
Convert count to mask in specific hardware driver. | |
#define | VSF_RTC_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_RTC_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_rtc_init()). | |
#define | VSF_RTC_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable macro VSF_RTC_CFG_REIMPLEMENT_TYPE_IRQ_MASK in specific hardware drivers to redefine enum vsf_rtc_irq_mask_t. | |
#define | VSF_RTC_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable reimplementation of configuration type. | |
#define | VSF_RTC_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable reimplementation of capability type. | |
#define | VSF_RTC_CFG_TIME_TYPE uint64_t |
Configure the data type used for time representation. | |
#define | VSF_RTC_CFG_INHERIT_HAL_CAPABILITY ENABLED |
Enable inheritance of HAL capability. | |
#define | VSF_RTC_APIS(__prefix_name) |
RTC API template macro, used to generate RTC type, specific prefix function declarations, etc. | |
Typedefs | |
typedef enum vsf_rtc_irq_mask_t | vsf_rtc_irq_mask_t |
RTC interrupt mask definition. Used to identify and manage different types of RTC interrupts. | |
typedef VSF_RTC_CFG_TIME_TYPE | vsf_rtc_time_t |
RTC time type definition. | |
typedef struct vsf_rtc_tm_t | vsf_rtc_tm_t |
Time structure for RTC operations. Used to represent date and time information in a standardized format. | |
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) |
RTC interrupt handler function type. | |
typedef struct vsf_rtc_isr_t | vsf_rtc_isr_t |
RTC interrupt service routine configuration structure. | |
typedef struct vsf_rtc_cfg_t | vsf_rtc_cfg_t |
RTC configuration structure. | |
typedef struct vsf_rtc_capability_t | vsf_rtc_capability_t |
RTC capability structure. Describes the features and capabilities supported by the RTC hardware. | |
typedef struct vsf_rtc_op_t | vsf_rtc_op_t |
RTC operation function pointer type, used for RTC Multi Class support. | |
Enumerations | |
enum | vsf_rtc_irq_mask_t { VSF_RTC_IRQ_MASK_ALARM = (1 << 0) } |
RTC interrupt mask definition. Used to identify and manage different types of RTC interrupts. More... | |
enum | { VSF_RTC_IRQ_ALL_BITS_MASK = VSF_RTC_IRQ_MASK_ALARM } |
RTC interrupt mask completion. Used to define the combination of all available interrupt masks. More... | |
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 a RTC instance. | |
fsm_rt_t | vsf_rtc_disable (vsf_rtc_t *rtc_ptr) |
Disable a 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 and time. | |
vsf_err_t | vsf_rtc_set (vsf_rtc_t *rtc_ptr, const vsf_rtc_tm_t *rtc_tm) |
Set RTC date and 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 time in seconds and milliseconds. | |
vsf_err_t | vsf_rtc_set_time (vsf_rtc_t *rtc_ptr, vsf_rtc_time_t seconds, vsf_rtc_time_t milliseconds) |
Set RTC time in seconds and milliseconds. | |
#define VSF_RTC_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.
#define VSF_RTC_CFG_PREFIX vsf |
Convert count to mask in specific hardware driver.
Convert mask to count in specific hardware driver.
We can redefine macro VSF_RTC_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code.
#define VSF_RTC_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_RTC_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_rtc_init()).
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
Enable macro VSF_RTC_CFG_REIMPLEMENT_TYPE_IRQ_MASK in specific hardware drivers to redefine enum vsf_rtc_irq_mask_t.
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Enable reimplementation of configuration type.
#define VSF_RTC_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Enable reimplementation of capability type.
#define VSF_RTC_CFG_TIME_TYPE uint64_t |
Configure the data type used for time representation.
#define VSF_RTC_CFG_INHERIT_HAL_CAPABILITY ENABLED |
Enable inheritance of HAL capability.
#define VSF_RTC_APIS | ( | __prefix_name | ) |
RTC API template macro, used to generate RTC type, specific prefix function declarations, etc.
[in] | __prefix_name | The prefix to use for all generated functions |
typedef enum vsf_rtc_irq_mask_t vsf_rtc_irq_mask_t |
RTC interrupt mask definition. Used to identify and manage different types of RTC interrupts.
typedef VSF_RTC_CFG_TIME_TYPE vsf_rtc_time_t |
RTC time type definition.
typedef struct vsf_rtc_tm_t vsf_rtc_tm_t |
Time structure for RTC operations. Used to represent date and time information in a standardized format.
typedef void vsf_rtc_isr_handler_t(void *target_ptr, vsf_rtc_t *rtc_ptr, vsf_rtc_irq_mask_t irq_mask) |
RTC interrupt handler function type.
[in,out] | target_ptr | User defined target pointer for context data |
[in] | rtc_ptr | RTC instance pointer for accessing RTC data |
[in] | irq_mask | Interrupt mask indicating which interrupt(s) occurred |
typedef struct vsf_rtc_isr_t vsf_rtc_isr_t |
RTC interrupt service routine configuration structure.
typedef struct vsf_rtc_cfg_t vsf_rtc_cfg_t |
RTC configuration structure.
typedef struct vsf_rtc_capability_t vsf_rtc_capability_t |
RTC capability structure. Describes the features and capabilities supported by the RTC hardware.
typedef struct vsf_rtc_op_t vsf_rtc_op_t |
RTC operation function pointer type, used for RTC Multi Class support.
enum vsf_rtc_irq_mask_t |
anonymous enum |
|
extern |
Initialize a RTC instance.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
[in] | cfg_ptr | Pointer to configuration structure vsf_rtc_cfg_t |
|
extern |
Enable a RTC instance.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
Disable a RTC instance.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
|
extern |
Get the capability of RTC instance.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
|
extern |
Get RTC date and time.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
[out] | rtc_tm | Date and time (year, month, day, hour, minute, second, etc.) |
|
extern |
Set RTC date and time.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
[in] | rtc_tm | Date and time (year, month, day, hour, minute, second, etc.) |
|
extern |
Get RTC time in seconds and milliseconds.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
[out] | second_ptr | Seconds |
[out] | millisecond_ptr | Milliseconds |
|
extern |
Set RTC time in seconds and milliseconds.
[in] | rtc_ptr | Pointer to structure vsf_rtc_t |
[in] | seconds | Seconds |
[in] | milliseconds | Milliseconds |