|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Counter capture APIs. More...
Functions | |
| static int | counter_capture_configure (const struct device *dev, uint8_t chan_id, counter_capture_flags_t flags, counter_capture_cb_t cb, void *user_data) |
| Configure a capture channel and register its callback. | |
| static int | counter_capture_configure_64 (const struct device *dev, uint8_t chan_id, counter_capture_flags_t flags, counter_capture_cb_64_t cb, void *user_data) |
| Configure a capture channel and register its callback for 64 bits ticks. | |
| int | counter_enable_capture (const struct device *dev, uint8_t chan_id) |
| Enable capture on a channel. | |
| int | counter_disable_capture (const struct device *dev, uint8_t chan_id) |
| Disable capture on a channel. | |
Counter capture APIs.
[Experimental] Users should note that the APIs can change as a part of ongoing development.
|
inlinestatic |
#include <zephyr/drivers/counter.h>
Configure a capture channel and register its callback.
Configures the edge polarity and capture mode (single-shot vs continuous) for a capture channel, and registers the callback that delivers captured tick values.
| dev | Pointer to the device structure for the driver instance |
| chan_id | Channel ID |
| flags | Configuration flags (COUNTER_CAPTURE_FLAGS) |
| cb | Callback function reference |
| user_data | Argument passed to the callback function |
| 0 | If successful. |
| Negative | error code on failure |
|
inlinestatic |
#include <zephyr/drivers/counter.h>
Configure a capture channel and register its callback for 64 bits ticks.
Configures the edge polarity and capture mode (single-shot vs continuous) for a capture channel, and registers the 64b callback that delivers captured tick values.
| dev | Pointer to the device structure for the driver instance |
| chan_id | Channel ID |
| flags | Configuration flags (COUNTER_CAPTURE_FLAGS) |
| cb | Callback function reference |
| user_data | Argument passed to the callback function |
| 0 | If successful. |
| Negative | error code on failure |
#include <zephyr/drivers/counter.h>
Disable capture on a channel.
| dev | Pointer to the device structure for the driver instance. |
| chan_id | Channel ID. |
| 0 | If successful. |
| Negative | error code on failure |
#include <zephyr/drivers/counter.h>
Enable capture on a channel.
| dev | Pointer to the device structure for the driver instance. |
| chan_id | Channel ID. |
| 0 | If successful. |
| Negative | error code on failure |