|
Zephyr API Documentation 4.5.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 | |
| counter_api_get_freq_64 | get_freq_64 |
| OPT Function to get counter frequency in 64bits. | |
| counter_api_get_value_64 | get_value_64 |
| OPT Get current counter 64-bit value. | |
| counter_api_set_value_64 | set_value_64 |
| OPT Set current counter 64-bit value. | |
| counter_api_set_alarm_64 | set_alarm_64 |
| REQ Set a single shot alarm on a channel for 64 bits. | |
| counter_api_get_guard_period_64 | get_guard_period_64 |
| OPT Return guard period for 64 bits. | |
| counter_api_set_guard_period_64 | set_guard_period_64 |
| OPT Set guard period in counter ticks for 64 bits. | |
| counter_api_get_top_value_64 | get_top_value_64 |
| REQ Function to retrieve current top value for 64 bits. | |
| counter_api_set_top_value_64 | set_top_value_64 |
| REQ Set counter top value for 64 bits. | |
| counter_api_capture_configure | capture_configure |
| REQ Configure a capture channel and register its callback. | |
| counter_api_capture_configure_64 | capture_configure_64 |
| REQ Configure a capture channel and register its callback for 64 bits ticks. | |
| counter_api_enable_capture | enable_capture |
| REQ Enable capture on a channel. | |
| counter_api_disable_capture | disable_capture |
| REQ Disable capture on a channel. | |
| counter_api_set_calibration | set_calibration |
| OPT Set counter calibration value. | |
| counter_api_get_calibration | get_calibration |
| OPT Get counter calibration value. | |
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_capture_configure counter_driver_api::capture_configure |
REQ Configure a capture channel and register its callback.
CONFIG_COUNTER_CAPTURE. | counter_api_capture_configure_64 counter_driver_api::capture_configure_64 |
REQ Configure a capture channel and register its callback for 64 bits ticks.
CONFIG_COUNTER_CAPTURE, CONFIG_COUNTER_64BITS_TICKS. | counter_api_disable_capture counter_driver_api::disable_capture |
REQ Disable capture on a channel.
CONFIG_COUNTER_CAPTURE. | counter_api_enable_capture counter_driver_api::enable_capture |
REQ Enable capture on a channel.
CONFIG_COUNTER_CAPTURE. | counter_api_get_calibration counter_driver_api::get_calibration |
OPT Get counter calibration value.
CONFIG_COUNTER_CALIBRATION. | counter_api_get_freq counter_driver_api::get_freq |
OPT
| counter_api_get_freq_64 counter_driver_api::get_freq_64 |
OPT Function to get counter frequency in 64bits.
CONFIG_COUNTER_64BITS_FREQ. | counter_api_get_guard_period counter_driver_api::get_guard_period |
OPT Return guard period.
| counter_api_get_guard_period_64 counter_driver_api::get_guard_period_64 |
OPT Return guard period for 64 bits.
CONFIG_COUNTER_64BITS_TICKS. | 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_top_value_64 counter_driver_api::get_top_value_64 |
REQ Function to retrieve current top value for 64 bits.
CONFIG_COUNTER_64BITS_TICKS. | counter_api_get_value counter_driver_api::get_value |
REQ Get current counter value.
| counter_api_get_value_64 counter_driver_api::get_value_64 |
OPT Get current counter 64-bit value.
CONFIG_COUNTER_64BITS_TICKS. | 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_alarm_64 counter_driver_api::set_alarm_64 |
REQ Set a single shot alarm on a channel for 64 bits.
CONFIG_COUNTER_64BITS_TICKS. | counter_api_set_calibration counter_driver_api::set_calibration |
OPT Set counter calibration value.
CONFIG_COUNTER_CALIBRATION. | counter_api_set_guard_period counter_driver_api::set_guard_period |
OPT Set guard period in counter ticks.
| counter_api_set_guard_period_64 counter_driver_api::set_guard_period_64 |
OPT Set guard period in counter ticks for 64 bits.
CONFIG_COUNTER_64BITS_TICKS. | counter_api_set_top_value counter_driver_api::set_top_value |
REQ Set counter top value.
| counter_api_set_top_value_64 counter_driver_api::set_top_value_64 |
REQ Set counter top value for 64 bits.
CONFIG_COUNTER_64BITS_TICKS. | counter_api_set_value counter_driver_api::set_value |
OPT Set current counter value.
| counter_api_set_value_64 counter_driver_api::set_value_64 |
OPT Set current counter 64-bit value.
CONFIG_COUNTER_64BITS_TICKS. | 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.