Loading...
Searching...
No Matches
ztimer_ops_t Struct Reference

ztimer backend method structure More...

Detailed Description

ztimer backend method structure

This table contains pointers to the virtual methods for a ztimer clock.

These functions used by ztimer core to interact with the underlying clock.

Definition at line 331 of file ztimer.h.

#include <ztimer.h>

Data Fields

void(* set )(ztimer_clock_t *clock, uint32_t val)
 Set a new timer target.
 
uint32_t(* now )(ztimer_clock_t *clock)
 Get the current count of the timer.
 
void(* cancel )(ztimer_clock_t *clock)
 Cancel any set target.
 
void(* start )(ztimer_clock_t *clock)
 Starts the underlying timer.
 
void(* stop )(ztimer_clock_t *clock)
 Stops the underlying timer.
 

Field Documentation

◆ cancel

void(* ztimer_ops_t::cancel) (ztimer_clock_t *clock)

Cancel any set target.

Parameters
clockztimer clock to cancel a pending alarm, if any

Definition at line 349 of file ztimer.h.

◆ now

uint32_t(* ztimer_ops_t::now) (ztimer_clock_t *clock)

Get the current count of the timer.

Parameters
clockztimer clock to get the current time from

Definition at line 343 of file ztimer.h.

◆ set

void(* ztimer_ops_t::set) (ztimer_clock_t *clock, uint32_t val)

Set a new timer target.

Parameters
clockztimer clock to set the new target
valRelative target (e.g. fire at value now() + val)

Definition at line 337 of file ztimer.h.

◆ start

void(* ztimer_ops_t::start) (ztimer_clock_t *clock)

Starts the underlying timer.

Parameters
clockztimer clock to start

Definition at line 356 of file ztimer.h.

◆ stop

void(* ztimer_ops_t::stop) (ztimer_clock_t *clock)

Stops the underlying timer.

Parameters
clockztimer clock to stop

Definition at line 362 of file ztimer.h.


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