|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Data Structures | |
| struct | counter_driver_api |
| Driver Operations Counter driver operations More... | |
Typedefs | |
| typedef int(* | counter_api_start) (const struct device *dev) |
| Callback API to start the counter. | |
| typedef int(* | counter_api_stop) (const struct device *dev) |
| Callback API to stop the counter. | |
| typedef int(* | counter_api_get_value) (const struct device *dev, uint32_t *ticks) |
| Callback API to get the current counter value. | |
| typedef int(* | counter_api_reset) (const struct device *dev) |
| Callback API to reset the counter to the initial value. | |
| typedef int(* | counter_api_set_value) (const struct device *dev, uint32_t ticks) |
| Callback API to set the current counter value. | |
| typedef int(* | counter_api_set_alarm) (const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg *alarm_cfg) |
| Callback API to set a single shot alarm on a channel. | |
| typedef int(* | counter_api_cancel_alarm) (const struct device *dev, uint8_t chan_id) |
| Callback API to cancel an alarm on a channel. | |
| typedef int(* | counter_api_set_top_value) (const struct device *dev, const struct counter_top_cfg *cfg) |
| Callback API to set the counter top value. | |
| typedef uint32_t(* | counter_api_get_pending_int) (const struct device *dev) |
| Callback API to get pending counter interrupts. | |
| typedef uint32_t(* | counter_api_get_top_value) (const struct device *dev) |
| Callback API to retrieve the current top value. | |
| typedef uint32_t(* | counter_api_get_guard_period) (const struct device *dev, uint32_t flags) |
| Callback API to retrieve the guard period in ticks. | |
| typedef int(* | counter_api_set_guard_period) (const struct device *dev, uint32_t ticks, uint32_t flags) |
| Callback API to set the guard period in ticks. | |
| typedef uint32_t(* | counter_api_get_freq) (const struct device *dev) |
| Callback API to get the counter frequency in Hz. | |
| typedef uint64_t(* | counter_api_get_freq_64) (const struct device *dev) |
| Callback API to get the counter frequency in Hz (64 bits). | |
| typedef int(* | counter_api_get_value_64) (const struct device *dev, uint64_t *ticks) |
| Callback API to get the current counter value (64 bits). | |
| typedef int(* | counter_api_set_value_64) (const struct device *dev, uint64_t ticks) |
| Callback API to set the current counter value (64 bits). | |
| typedef int(* | counter_api_set_alarm_64) (const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg_64 *alarm_cfg) |
| Callback API to set a single shot alarm on a channel (64 bits). | |
| typedef uint64_t(* | counter_api_get_guard_period_64) (const struct device *dev, uint32_t flags) |
| Callback API to retrieve the guard period in ticks (64 bits). | |
| typedef int(* | counter_api_set_guard_period_64) (const struct device *dev, uint64_t ticks, uint32_t flags) |
| Callback API to set the guard period in ticks (64 bits). | |
| typedef uint64_t(* | counter_api_get_top_value_64) (const struct device *dev) |
| Callback API to retrieve the current top value (64 bits). | |
| typedef int(* | counter_api_set_top_value_64) (const struct device *dev, const struct counter_top_cfg_64 *cfg) |
| Callback API to set the counter top value (64 bits). | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a Counter driver.
#include <zephyr/drivers/counter.h>
Callback API to cancel an alarm on a channel.
#include <zephyr/drivers/counter.h>
Callback API to get the counter frequency in Hz.
#include <zephyr/drivers/counter.h>
Callback API to get the counter frequency in Hz (64 bits).
#include <zephyr/drivers/counter.h>
Callback API to retrieve the guard period in ticks.
#include <zephyr/drivers/counter.h>
Callback API to retrieve the guard period in ticks (64 bits).
#include <zephyr/drivers/counter.h>
Callback API to get pending counter interrupts.
#include <zephyr/drivers/counter.h>
Callback API to retrieve the current top value.
#include <zephyr/drivers/counter.h>
Callback API to retrieve the current top value (64 bits).
#include <zephyr/drivers/counter.h>
Callback API to get the current counter value.
#include <zephyr/drivers/counter.h>
Callback API to get the current counter value (64 bits).
| typedef int(* counter_api_reset) (const struct device *dev) |
#include <zephyr/drivers/counter.h>
Callback API to reset the counter to the initial value.
| typedef int(* counter_api_set_alarm) (const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg *alarm_cfg) |
#include <zephyr/drivers/counter.h>
Callback API to set a single shot alarm on a channel.
| typedef int(* counter_api_set_alarm_64) (const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg_64 *alarm_cfg) |
#include <zephyr/drivers/counter.h>
Callback API to set a single shot alarm on a channel (64 bits).
| typedef int(* counter_api_set_guard_period) (const struct device *dev, uint32_t ticks, uint32_t flags) |
#include <zephyr/drivers/counter.h>
Callback API to set the guard period in ticks.
| typedef int(* counter_api_set_guard_period_64) (const struct device *dev, uint64_t ticks, uint32_t flags) |
#include <zephyr/drivers/counter.h>
Callback API to set the guard period in ticks (64 bits).
| typedef int(* counter_api_set_top_value) (const struct device *dev, const struct counter_top_cfg *cfg) |
#include <zephyr/drivers/counter.h>
Callback API to set the counter top value.
| typedef int(* counter_api_set_top_value_64) (const struct device *dev, const struct counter_top_cfg_64 *cfg) |
#include <zephyr/drivers/counter.h>
Callback API to set the counter top value (64 bits).
#include <zephyr/drivers/counter.h>
Callback API to set the current counter value.
#include <zephyr/drivers/counter.h>
Callback API to set the current counter value (64 bits).
| typedef int(* counter_api_start) (const struct device *dev) |
#include <zephyr/drivers/counter.h>
Callback API to start the counter.
| typedef int(* counter_api_stop) (const struct device *dev) |
#include <zephyr/drivers/counter.h>
Callback API to stop the counter.