|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Driver Operations Counter driver operations More...
#include <zephyr/drivers/counter.h>
Data Fields | |
| counter_api_start | start |
| REQ Start counter device in free running mode. | |
| counter_api_stop | stop |
| REQ Stop counter device. | |
| counter_api_get_value | get_value |
| REQ Get current counter value. | |
| counter_api_reset | reset |
| OPT Reset the counter to the initial value. | |
| counter_api_set_value | set_value |
| OPT Set current counter value. | |
| counter_api_set_alarm | set_alarm |
| REQ Set a single shot alarm on a channel. | |
| counter_api_cancel_alarm | cancel_alarm |
| REQ Cancel an alarm on a channel. | |
| counter_api_set_top_value | set_top_value |
| REQ Set counter top value. | |
| counter_api_get_pending_int | get_pending_int |
| REQ Function to get pending interrupts. | |
| counter_api_get_top_value | get_top_value |
| REQ Function to retrieve current top value. | |
| counter_api_get_guard_period | get_guard_period |
| OPT Return guard period. | |
| counter_api_set_guard_period | set_guard_period |
| OPT Set guard period in counter ticks. | |
| counter_api_get_freq | get_freq |
| OPT | |
Driver Operations Counter driver operations
This is the driver API structure any Counter driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.
Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.
| counter_api_cancel_alarm counter_driver_api::cancel_alarm |
REQ Cancel an alarm on a channel.
| counter_api_get_freq counter_driver_api::get_freq |
OPT
| counter_api_get_guard_period counter_driver_api::get_guard_period |
OPT Return guard period.
| counter_api_get_pending_int counter_driver_api::get_pending_int |
REQ Function to get pending interrupts.
| counter_api_get_top_value counter_driver_api::get_top_value |
REQ Function to retrieve current top value.
| counter_api_get_value counter_driver_api::get_value |
REQ Get current counter value.
| counter_api_reset counter_driver_api::reset |
OPT Reset the counter to the initial value.
| counter_api_set_alarm counter_driver_api::set_alarm |
REQ Set a single shot alarm on a channel.
| counter_api_set_guard_period counter_driver_api::set_guard_period |
OPT Set guard period in counter ticks.
| counter_api_set_top_value counter_driver_api::set_top_value |
REQ Set counter top value.
| counter_api_set_value counter_driver_api::set_value |
OPT Set current counter value.
| counter_api_start counter_driver_api::start |
REQ Start counter device in free running mode.
| counter_api_stop counter_driver_api::stop |
REQ Stop counter device.