15#ifndef ZEPHYR_INCLUDE_DRIVERS_COUNTER_H_
16#define ZEPHYR_INCLUDE_DRIVERS_COUNTER_H_
57#define COUNTER_CONFIG_INFO_COUNT_UP BIT(0)
73#define COUNTER_TOP_CFG_DONT_RESET BIT(0)
81#define COUNTER_TOP_CFG_RESET_WHEN_LATE BIT(1)
98#define COUNTER_ALARM_CFG_ABSOLUTE BIT(0)
106#define COUNTER_ALARM_CFG_EXPIRE_WHEN_LATE BIT(1)
122#define COUNTER_GUARD_PERIOD_LATE_TO_SET BIT(0)
139#define COUNTER_CAPTURE_CONTINUOUS 0
144#define COUNTER_CAPTURE_SINGLE_SHOT BIT(2)
225#define COUNTER_CAPTURE_DT_SPEC_GET_BY_NAME(node_id, prop, name) \
227 .dev = DEVICE_DT_GET(DT_COUNTER_CAPTURES_CTLR_BY_NAME(node_id, prop, name)), \
228 .chan_id = (uint8_t)DT_COUNTER_CAPTURES_CHANNEL_BY_NAME(node_id, prop, name), \
229 .flags = DT_COUNTER_CAPTURES_FLAGS_BY_NAME(node_id, prop, name), \
246#define COUNTER_CAPTURE_DT_SPEC_INST_GET_BY_NAME(inst, prop, name) \
247 COUNTER_CAPTURE_DT_SPEC_GET_BY_NAME(DT_DRV_INST(inst), prop, name)
270#define COUNTER_CAPTURE_DT_SPEC_GET_BY_NAME_OR(node_id, prop, name, default_value) \
271 COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
272 (COUNTER_CAPTURE_DT_SPEC_GET_BY_NAME(node_id, prop, name)), \
290#define COUNTER_CAPTURE_DT_SPEC_INST_GET_BY_NAME_OR(inst, prop, name, default_value) \
291 COUNTER_CAPTURE_DT_SPEC_GET_BY_NAME_OR(DT_DRV_INST(inst), prop, name, default_value)
336#define COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX(node_id, prop, idx) \
338 .dev = DEVICE_DT_GET(DT_COUNTER_CAPTURES_CTLR_BY_IDX(node_id, prop, idx)), \
339 .chan_id = (uint8_t)DT_COUNTER_CAPTURES_CHANNEL_BY_IDX(node_id, prop, idx), \
340 .flags = DT_COUNTER_CAPTURES_FLAGS_BY_IDX(node_id, prop, idx), \
356#define COUNTER_CAPTURE_DT_SPEC_INST_GET_BY_IDX(inst, prop, idx) \
357 COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
379#define COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX_OR(node_id, prop, idx, default_value) \
380 COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
381 (COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX(node_id, prop, idx)), \
398#define COUNTER_CAPTURE_DT_SPEC_INST_GET_BY_IDX_OR(inst, prop, idx, default_value) \
399 COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX_OR(DT_DRV_INST(inst), prop, idx, default_value)
413#define COUNTER_CAPTURE_DT_SPEC_GET(node_id, prop) \
414 COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
428#define COUNTER_CAPTURE_DT_SPEC_INST_GET(inst, prop) \
429 COUNTER_CAPTURE_DT_SPEC_GET(DT_DRV_INST(inst), prop)
445#define COUNTER_CAPTURE_DT_SPEC_GET_OR(node_id, prop, default_value) \
446 COUNTER_CAPTURE_DT_SPEC_GET_BY_IDX_OR(node_id, prop, 0, default_value)
462#define COUNTER_CAPTURE_DT_SPEC_INST_GET_OR(inst, prop, default_value) \
463 COUNTER_CAPTURE_DT_SPEC_GET_OR(DT_DRV_INST(inst), prop, default_value)
557#ifdef CONFIG_COUNTER_64BITS_FREQ
565#ifdef CONFIG_COUNTER_64BITS_TICKS
569#ifdef CONFIG_BIG_ENDIAN
798#ifdef CONFIG_COUNTER_64BITS_FREQ
804#ifdef CONFIG_COUNTER_64BITS_TICKS
834#ifdef CONFIG_COUNTER_CAPTURE
839#ifdef CONFIG_COUNTER_64BITS_TICKS
854#if defined(CONFIG_COUNTER_CALIBRATION) || defined(__DOXYGEN__)
879static inline bool z_impl_counter_is_counting_up(
const struct device *dev)
895static inline uint8_t z_impl_counter_get_num_of_channels(
const struct device *dev)
899 return config->channels;
904#ifdef CONFIG_COUNTER_64BITS_FREQ
915static inline uint32_t z_impl_counter_get_frequency(
const struct device *dev)
937static inline uint32_t z_impl_counter_get_frequency(
const struct device *dev)
956static inline uint64_t z_impl_counter_get_frequency_64(
const struct device *dev)
958#ifdef CONFIG_COUNTER_64BITS_FREQ
962 if (api->get_freq_64) {
963 return api->get_freq_64(dev);
975#ifdef CONFIG_COUNTER_64BITS_FREQ
976#define z_counter_get_frequency z_impl_counter_get_frequency_64
978#define z_counter_get_frequency z_impl_counter_get_frequency
1010 uint64_t freq = z_counter_get_frequency(dev);
1042 uint64_t freq = z_counter_get_frequency(dev);
1076 uint64_t freq = z_counter_get_frequency(dev);
1108 uint64_t freq = z_counter_get_frequency(dev);
1126static inline uint32_t z_impl_counter_get_max_top_value(
const struct device *dev)
1130 return config->max_top_value;
1142static inline int z_impl_counter_start(
const struct device *dev)
1158static inline int z_impl_counter_stop(
const struct device *dev)
1172static inline int z_impl_counter_get_value(
const struct device *dev,
uint32_t *ticks)
1185static inline int z_impl_counter_reset(
const struct device *dev)
1193 return api->
reset(dev);
1205static inline int z_impl_counter_set_value(
const struct device *dev,
uint32_t ticks)
1239static inline int z_impl_counter_set_channel_alarm(
const struct device *dev,
uint8_t chan_id,
1248 return api->
set_alarm(dev, chan_id, alarm_cfg);
1265static inline int z_impl_counter_cancel_channel_alarm(
const struct device *dev,
uint8_t chan_id)
1306static inline int z_impl_counter_set_top_value(
const struct device *dev,
1333static inline uint32_t z_impl_counter_get_pending_int(
const struct device *dev)
1347static inline uint32_t z_impl_counter_get_top_value(
const struct device *dev)
1412static inline int z_impl_counter_set_guard_period(
const struct device *dev,
uint32_t ticks,
1453static inline uint64_t z_impl_counter_get_max_top_value_64(
const struct device *dev)
1455#ifdef CONFIG_COUNTER_64BITS_TICKS
1458 return config->max_top_value_64;
1492static inline int z_impl_counter_set_top_value_64(
const struct device *dev,
1495#ifdef CONFIG_COUNTER_64BITS_TICKS
1502 return api->set_top_value_64(dev, cfg);
1533static inline int z_impl_counter_set_channel_alarm_64(
const struct device *dev,
uint8_t chan_id,
1536#ifdef CONFIG_COUNTER_64BITS_TICKS
1543 return api->set_alarm_64(dev, chan_id, alarm_cfg);
1546 ARG_UNUSED(chan_id);
1547 ARG_UNUSED(alarm_cfg);
1561static inline uint64_t z_impl_counter_get_top_value_64(
const struct device *dev)
1563#ifdef CONFIG_COUNTER_64BITS_TICKS
1631static inline int z_impl_counter_set_guard_period_64(
const struct device *dev,
uint64_t ticks,
1634#ifdef CONFIG_COUNTER_64BITS_TICKS
1637 if (!api->set_guard_period_64) {
1641 return api->set_guard_period_64(dev, ticks,
flags);
1665#ifdef CONFIG_COUNTER_64BITS_TICKS
1668 return (api->get_guard_period_64) ? api->get_guard_period_64(dev,
flags) : 0;
1685static inline int z_impl_counter_get_value_64(
const struct device *dev,
uint64_t *ticks)
1687#ifdef CONFIG_COUNTER_64BITS_TICKS
1690 if (!api->get_value_64) {
1694 return api->get_value_64(dev, ticks);
1711static inline int z_impl_counter_set_value_64(
const struct device *dev,
uint64_t ticks)
1713#ifdef CONFIG_COUNTER_64BITS_TICKS
1716 if (!api->set_value_64) {
1720 return api->set_value_64(dev, ticks);
1728#if defined(CONFIG_COUNTER_CAPTURE) || defined(__DOXYGEN__)
1772 if (api->capture_configure == NULL) {
1780 return api->capture_configure(dev, chan_id,
flags, cb, user_data);
1799#if defined(CONFIG_COUNTER_64BITS_TICKS) || defined(__DOXYGEN__)
1833 if (api->capture_configure_64 == NULL) {
1841 return api->capture_configure_64(dev, chan_id,
flags, cb, user_data);
1873static inline int z_impl_counter_enable_capture(
const struct device *dev,
uint8_t chan_id)
1877 if (api->enable_capture == NULL) {
1885 return api->enable_capture(dev, chan_id);
1912static inline int z_impl_counter_disable_capture(
const struct device *dev,
uint8_t chan_id)
1916 if (api->disable_capture == NULL) {
1924 return api->disable_capture(dev, chan_id);
1943#if defined(CONFIG_COUNTER_CALIBRATION) || defined(__DOXYGEN__)
1959static inline int z_impl_counter_set_calibration(
const struct device *dev,
int32_t calibration)
1981static inline int z_impl_counter_get_calibration(
const struct device *dev,
int32_t *calibration)
2001#include <zephyr/syscalls/counter.h>
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1425
Counter capture Devicetree macro public API header file.
Counter capture flags for use in devicetree.
#define NSEC_PER_SEC
number of nanoseconds per second
Definition clock.h:113
#define USEC_PER_SEC
number of microseconds per second
Definition clock.h:110
static int counter_enable_capture_dt(const struct counter_capture_dt_spec *spec)
Enable capture on a channel using a DT spec.
Definition counter.h:1896
static int counter_disable_capture_dt(const struct counter_capture_dt_spec *spec)
Disable capture on a channel using a DT spec.
Definition counter.h:1935
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.
Definition counter.h:1766
int counter_disable_capture(const struct device *dev, uint8_t chan_id)
Disable capture on a channel.
static int counter_capture_configure_64_dt(const struct counter_capture_dt_spec *spec, counter_capture_cb_64_t cb, void *user_data)
Configure a capture channel and register its 64-bit callback using a DT spec.
Definition counter.h:1854
static int counter_capture_configure_dt(const struct counter_capture_dt_spec *spec, counter_capture_cb_t cb, void *user_data)
Configure a capture channel and register its callback using a DT spec.
Definition counter.h:1793
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.
Definition counter.h:1827
int counter_enable_capture(const struct device *dev, uint8_t chan_id)
Enable capture on a channel.
int(* counter_api_get_calibration)(const struct device *dev, int32_t *calibration)
Callback API to get counter calibration in parts per billion.
Definition counter.h:740
uint32_t(* counter_api_get_top_value)(const struct device *dev)
Callback API to retrieve the current top value.
Definition counter.h:696
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).
Definition counter.h:722
uint64_t(* counter_api_get_top_value_64)(const struct device *dev)
Callback API to retrieve the current top value (64 bits).
Definition counter.h:720
int(* counter_api_set_value)(const struct device *dev, uint32_t ticks)
Callback API to set the current counter value.
Definition counter.h:684
int(* counter_api_stop)(const struct device *dev)
Callback API to stop the counter.
Definition counter.h:678
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).
Definition counter.h:712
int(* counter_api_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)
Callback API to configure counter capture on a channel with 64-bit ticks.
Definition counter.h:729
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).
Definition counter.h:717
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).
Definition counter.h:715
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.
Definition counter.h:700
uint64_t(* counter_api_get_freq_64)(const struct device *dev)
Callback API to get the counter frequency in Hz (64 bits).
Definition counter.h:705
int(* counter_api_set_value_64)(const struct device *dev, uint64_t ticks)
Callback API to set the current counter value (64 bits).
Definition counter.h:710
uint32_t(* counter_api_get_guard_period)(const struct device *dev, uint32_t flags)
Callback API to retrieve the guard period in ticks.
Definition counter.h:698
uint32_t(* counter_api_get_pending_int)(const struct device *dev)
Callback API to get pending counter interrupts.
Definition counter.h:694
uint32_t(* counter_api_get_freq)(const struct device *dev)
Callback API to get the counter frequency in Hz.
Definition counter.h:703
int(* counter_api_set_top_value)(const struct device *dev, const struct counter_top_cfg *cfg)
Callback API to set the counter top value.
Definition counter.h:691
int(* counter_api_reset)(const struct device *dev)
Callback API to reset the counter to the initial value.
Definition counter.h:682
int(* counter_api_start)(const struct device *dev)
Callback API to start the counter.
Definition counter.h:676
int(* counter_api_capture_configure)(const struct device *dev, uint8_t chan_id, counter_capture_flags_t flags, counter_capture_cb_t cb, void *user_data)
Callback API to configure counter capture on a channel.
Definition counter.h:725
int(* counter_api_cancel_alarm)(const struct device *dev, uint8_t chan_id)
Callback API to cancel an alarm on a channel.
Definition counter.h:689
int(* counter_api_enable_capture)(const struct device *dev, uint8_t chan_id)
Callback API to enable counter capture on a channel.
Definition counter.h:733
int(* counter_api_get_value_64)(const struct device *dev, uint64_t *ticks)
Callback API to get the current counter value (64 bits).
Definition counter.h:708
int(* counter_api_get_value)(const struct device *dev, uint32_t *ticks)
Callback API to get the current counter value.
Definition counter.h:680
int(* counter_api_disable_capture)(const struct device *dev, uint8_t chan_id)
Callback API to disable counter capture on a channel.
Definition counter.h:735
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.
Definition counter.h:686
int(* counter_api_set_calibration)(const struct device *dev, int32_t calibration)
Callback API to set counter calibration in parts per billion.
Definition counter.h:738
int counter_set_channel_alarm(const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg *alarm_cfg)
Set a single shot alarm on a channel.
uint8_t counter_get_num_of_channels(const struct device *dev)
Function to get number of alarm channels.
int counter_start(const struct device *dev)
Start counter device in free running mode.
uint32_t counter_get_top_value(const struct device *dev)
Function to retrieve current top value.
int counter_set_channel_alarm_64(const struct device *dev, uint8_t chan_id, const struct counter_alarm_cfg_64 *alarm_cfg)
Set a single shot alarm on a channel for 64 bits.
uint32_t counter_get_pending_int(const struct device *dev)
Function to get pending interrupts.
uint64_t counter_ticks_to_us_64(const struct device *dev, uint64_t ticks)
Function to convert ticks with 64 bits to microseconds.
int counter_reset(const struct device *dev)
Reset the counter to the initial value.
uint64_t counter_ns_to_ticks_64(const struct device *dev, uint64_t ns)
Function to convert nanoseconds to ticks with 64 bits.
int counter_set_top_value(const struct device *dev, const struct counter_top_cfg *cfg)
Set counter top value.
int counter_get_value_64(const struct device *dev, uint64_t *ticks)
Get current counter 64-bit value.
int counter_set_top_value_64(const struct device *dev, const struct counter_top_cfg_64 *cfg)
Set counter top value for 64 bits.
uint64_t counter_us_to_ticks_64(const struct device *dev, uint64_t us)
Function to convert microseconds to ticks with 64 bits.
void(* counter_top_callback_t)(const struct device *dev, void *user_data)
Callback called when counter turns around.
Definition counter.h:528
void(* counter_alarm_callback_t)(const struct device *dev, uint8_t chan_id, uint32_t ticks, void *user_data)
Alarm callback.
Definition counter.h:486
uint64_t counter_get_max_top_value_64(const struct device *dev)
Function to retrieve maximum top value that can be set for 64 bits.
uint64_t counter_get_guard_period_64(const struct device *dev, uint32_t flags)
Return guard period for 64 bits.
uint64_t counter_get_frequency_64(const struct device *dev)
Function to get counter frequency in 64bits.
void(* counter_capture_cb_64_t)(const struct device *dev, uint8_t chan_id, counter_capture_flags_t flags, uint64_t ticks, void *user_data)
Counter capture callback for 64 bits ticks.
Definition counter.h:666
void(* counter_capture_cb_t)(const struct device *dev, uint8_t chan_id, counter_capture_flags_t flags, uint32_t ticks, void *user_data)
Counter capture callback.
Definition counter.h:475
void(* counter_alarm_callback_64_t)(const struct device *dev, uint8_t chan_id, uint64_t ticks, void *user_data)
Alarm callback.
Definition counter.h:600
uint64_t counter_ticks_to_ns_64(const struct device *dev, uint64_t ticks)
Function to convert ticks with 64 bits to nanoseconds.
uint32_t counter_get_guard_period(const struct device *dev, uint32_t flags)
Return guard period.
int counter_set_value(const struct device *dev, uint32_t ticks)
Set current counter value.
uint32_t counter_capture_flags_t
Provides a type to hold Counter Capture configuration flags.
Definition counter.h:155
uint32_t counter_get_frequency(const struct device *dev)
int counter_get_value(const struct device *dev, uint32_t *ticks)
Get current counter value.
#define COUNTER_CONFIG_INFO_COUNT_UP
Counter count up flag.
Definition counter.h:57
int counter_set_calibration(const struct device *dev, int32_t calibration)
Set counter calibration value.
int counter_set_value_64(const struct device *dev, uint64_t ticks)
Set current counter 64-bit value.
uint64_t counter_get_top_value_64(const struct device *dev)
Function to retrieve current top value for 64 bits.
uint64_t counter_ticks_to_us(const struct device *dev, uint32_t ticks)
Function to convert ticks to microseconds.
int counter_set_guard_period(const struct device *dev, uint32_t ticks, uint32_t flags)
Set guard period in counter ticks.
uint32_t counter_us_to_ticks(const struct device *dev, uint64_t us)
Function to convert microseconds to ticks.
bool counter_is_counting_up(const struct device *dev)
Function to check if counter is counting up.
int counter_set_guard_period_64(const struct device *dev, uint64_t ticks, uint32_t flags)
Set guard period in counter ticks for 64 bits.
int counter_get_calibration(const struct device *dev, int32_t *calibration)
Get counter calibration value.
uint64_t counter_ticks_to_ns(const struct device *dev, uint32_t ticks)
Function to convert ticks to nanoseconds.
int counter_cancel_channel_alarm(const struct device *dev, uint8_t chan_id)
Cancel an alarm on a channel.
uint32_t counter_ns_to_ticks(const struct device *dev, uint64_t ns)
Function to convert nanoseconds to ticks.
int counter_stop(const struct device *dev)
Stop counter device.
uint32_t counter_get_max_top_value(const struct device *dev)
Function to retrieve maximum top value that can be set.
#define EINVAL
Invalid argument.
Definition errno.h:60
#define ENOSYS
Function not implemented.
Definition errno.h:82
#define ENOTSUP
Unsupported value.
Definition errno.h:114
flags
Definition parser.h:97
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
#define UINT32_MAX
Definition stdint.h:29
Alarm callback structure.
Definition counter.h:605
void * user_data
User data returned in callback.
Definition counter.h:630
uint32_t flags
Alarm flags (see COUNTER_ALARM_FLAGS).
Definition counter.h:634
counter_alarm_callback_64_t callback
Callback called on alarm (cannot be NULL).
Definition counter.h:626
uint64_t ticks
Number of ticks that triggers the alarm.
Definition counter.h:622
Alarm callback structure.
Definition counter.h:491
uint32_t ticks
Number of ticks that triggers the alarm.
Definition counter.h:512
uint32_t flags
Alarm flags (see COUNTER_ALARM_FLAGS).
Definition counter.h:520
void * user_data
User data returned in callback.
Definition counter.h:516
counter_alarm_callback_t callback
Callback called on alarm (cannot be NULL).
Definition counter.h:495
Container for counter capture information specified in devicetree.
Definition counter.h:171
counter_capture_flags_t flags
Capture flags.
Definition counter.h:175
const struct device * dev
Counter device instance.
Definition counter.h:173
uint8_t chan_id
Channel ID.
Definition counter.h:177
Structure with generic counter features.
Definition counter.h:553
uint32_t max_top_value
Maximal (default) top value on which counter is reset (cleared or reloaded).
Definition counter.h:579
uint32_t freq
Frequency of the source clock if synchronous events are counted.
Definition counter.h:560
uint8_t flags
Flags (see COUNTER_FLAGS).
Definition counter.h:584
uint8_t channels
Number of channels that can be used for setting alarm.
Definition counter.h:590
<span class="mlabel">Driver Operations</span> Counter driver operations
Definition counter.h:745
counter_api_get_calibration get_calibration
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:862
counter_api_get_top_value get_top_value
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:785
counter_api_set_top_value set_top_value
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:777
counter_api_set_alarm set_alarm
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:769
counter_api_get_value get_value
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:757
counter_api_reset reset
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:761
counter_api_get_pending_int get_pending_int
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:781
counter_api_stop stop
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:753
counter_api_set_guard_period set_guard_period
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:793
counter_api_set_value set_value
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:765
counter_api_start start
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:749
counter_api_set_calibration set_calibration
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:858
counter_api_get_guard_period get_guard_period
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:789
counter_api_cancel_alarm cancel_alarm
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition counter.h:773
counter_api_get_freq get_freq
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition counter.h:797
Top value configuration structure.
Definition counter.h:639
void * user_data
User data passed to callback function (not valid if callback is NULL).
Definition counter.h:651
counter_top_callback_t callback
Callback function (can be NULL).
Definition counter.h:647
uint32_t flags
Flags (see COUNTER_TOP_FLAGS).
Definition counter.h:655
uint64_t ticks
Top value.
Definition counter.h:643
Top value configuration structure.
Definition counter.h:532
uint32_t ticks
Top value.
Definition counter.h:536
uint32_t flags
Flags (see COUNTER_TOP_FLAGS).
Definition counter.h:548
counter_top_callback_t callback
Callback function (can be NULL).
Definition counter.h:540
void * user_data
User data passed to callback function (not valid if callback is NULL).
Definition counter.h:544
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
const void * config
Address of device instance config information.
Definition device.h:517