Zephyr Project API  3.4.0
A Scalable Open Source RTOS
counter_alarm_cfg Struct Reference

Alarm callback structure. More...

#include <counter.h>

Data Fields

counter_alarm_callback_t callback
 
uint32_t ticks
 
void * user_data
 
uint32_t flags
 

Detailed Description

Alarm callback structure.

Parameters
callbackCallback called on alarm (cannot be NULL).
ticksNumber of ticks that triggers the alarm. It can be relative (to now) or an absolute value (see COUNTER_ALARM_CFG_ABSOLUTE). Both, relative and absolute, alarm values can be any value between zero and the current top value (see counter_get_top_value). When setting an absolute alarm value close to the current counter value there is a risk that the counter will have counted past the given absolute value before the driver manages to activate the alarm. Therefore a guard period can be defined that lets the driver decide unambiguously whether it is late or not (see counter_set_guard_period). If the counter is clock driven then ticks can be converted to microseconds (see counter_ticks_to_us). Alternatively, the counter implementation may count asynchronous events.
user_dataUser data returned in callback.
flagsAlarm flags. See Alarm configuration flags.

Field Documentation

◆ callback

counter_alarm_callback_t counter_alarm_cfg::callback

◆ flags

uint32_t counter_alarm_cfg::flags

◆ ticks

uint32_t counter_alarm_cfg::ticks

◆ user_data

void* counter_alarm_cfg::user_data

The documentation for this struct was generated from the following file: