PebbleOS v4.44.0-199-g465b7d28c
Loading...
Searching...
No Matches
pbl_clk_cal_ops Struct Reference

Gate operations, called from the tick interrupt or a thread, one gate at a time. More...

#include <cal.h>

Data Fields

int(* start )(struct pbl_clk_cal *cal, uint32_t cycles)
 Start a gate of cycles oscillator cycles.
 
int(* finish )(struct pbl_clk_cal *cal, uint32_t cycles, double *hz)
 Read the gate started last, of cycles cycles, once its time has passed, and release the hardware.
 

Detailed Description

Gate operations, called from the tick interrupt or a thread, one gate at a time.

Field Documentation

◆ finish

int(* pbl_clk_cal_ops::finish) (struct pbl_clk_cal *cal, uint32_t cycles, double *hz)

Read the gate started last, of cycles cycles, once its time has passed, and release the hardware.

Returns 0 with the measured frequency in Hz, or a negative errno.

◆ start

int(* pbl_clk_cal_ops::start) (struct pbl_clk_cal *cal, uint32_t cycles)

Start a gate of cycles oscillator cycles.

Returns 0, -EBUSY to be retried a second later, or another negative errno to skip this period.


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