TIMER peripheral driver. More...
Data Structures | |
struct | npmx_timer_t |
Data structure of the TIMER driver instance. More... | |
struct | npmx_timer_config_t |
Configuration structure for timer. More... | |
struct | npmx_timer_status_t |
Timer status structure. More... | |
Enumerations | |
enum | npmx_timer_task_t { NPMX_TIMER_TASK_ENABLE , NPMX_TIMER_TASK_DISABLE , NPMX_TIMER_TASK_STROBE , NPMX_TIMER_TASK_KICK , NPMX_TIMER_TASK_COUNT } |
TIMER tasks. More... | |
enum | npmx_timer_mode_t { NPMX_TIMER_MODE_BOOT_MONITOR = TIMER_TIMERCONFIG_TIMERMODESEL_BOOTMONITOR , NPMX_TIMER_MODE_WATCHDOG_WARNING = TIMER_TIMERCONFIG_TIMERMODESEL_WATCHDOGWARNING , NPMX_TIMER_MODE_WATCHDOG_RESET = TIMER_TIMERCONFIG_TIMERMODESEL_WATCHDOGRESET , NPMX_TIMER_MODE_GENERAL_PURPOSE = TIMER_TIMERCONFIG_TIMERMODESEL_GENPURPOSETIMER , NPMX_TIMER_MODE_WAKEUP = TIMER_TIMERCONFIG_TIMERMODESEL_WAKEUPTIMER , NPMX_TIMER_MODE_COUNT , NPMX_TIMER_MODE_INVALID = NPMX_INVALID_ENUM_VALUE } |
Available modes of the timer. More... | |
enum | npmx_timer_prescaler_t { NPMX_TIMER_PRESCALER_SLOW = TIMER_TIMERCONFIG_TIMERPRESCALER_SLOW , NPMX_TIMER_PRESCALER_FAST = TIMER_TIMERCONFIG_TIMERPRESCALER_FAST , NPMX_TIMER_PRESCALER_COUNT , NPMX_TIMER_PRESCALER_INVALID = NPMX_INVALID_ENUM_VALUE } |
Switches between 64 Hz and 512 Hz timer clock . More... | |
Functions | |
npmx_timer_t * | npmx_timer_get (npmx_instance_t *p_pmic, uint8_t idx) |
Function for returning TIMER instance based on index. | |
npmx_error_t | npmx_timer_task_trigger (npmx_timer_t const *p_instance, npmx_timer_task_t task) |
Function for activating the specified TIMER task. | |
npmx_error_t | npmx_timer_config_set (npmx_timer_t const *p_instance, npmx_timer_config_t const *p_config) |
Function for setting timer's configuration with mode, prescaler, and compare value. | |
npmx_error_t | npmx_timer_config_get (npmx_timer_t const *p_instance, npmx_timer_config_t *p_config) |
Function for reading the ADC configuration. | |
npmx_error_t | npmx_timer_status_get (npmx_timer_t const *p_instance, npmx_timer_status_t *p_status) |
Function for getting TIMER status. | |
TIMER peripheral driver.
enum npmx_timer_mode_t |
Available modes of the timer.
enum npmx_timer_task_t |
npmx_error_t npmx_timer_config_get | ( | npmx_timer_t const * | p_instance, |
npmx_timer_config_t * | p_config ) |
Function for reading the ADC configuration.
[in] | p_instance | Pointer to the ADC instance. |
[out] | p_config | Pointer to the ADC configuration structure. |
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |
npmx_error_t npmx_timer_config_set | ( | npmx_timer_t const * | p_instance, |
npmx_timer_config_t const * | p_config ) |
Function for setting timer's configuration with mode, prescaler, and compare value.
[in] | p_instance | Pointer to the TIMER instance. |
[in] | p_config | Pointer to the configuration of the TIMER to apply. |
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |
npmx_timer_t * npmx_timer_get | ( | npmx_instance_t * | p_pmic, |
uint8_t | idx ) |
Function for returning TIMER instance based on index.
[in] | p_pmic | Pointer to the PMIC instance. |
[in] | idx | Index of the TIMER instance. |
npmx_error_t npmx_timer_status_get | ( | npmx_timer_t const * | p_instance, |
npmx_timer_status_t * | p_status ) |
Function for getting TIMER status.
[in] | p_instance | Pointer to the TIMER instance. |
[out] | p_status | Pointer to the structure to be filled with TIMER status. |
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |
npmx_error_t npmx_timer_task_trigger | ( | npmx_timer_t const * | p_instance, |
npmx_timer_task_t | task ) |
Function for activating the specified TIMER task.
p_instance | Pointer to the TIMER instance. |
task | Task to be activated. |
NPMX_SUCCESS | Operation performed successfully. |
NPMX_ERROR_IO | Error using IO bus line. |