Loading...
Searching...
No Matches
freqm.h File Reference

FREQM peripheral driver interface definitions. More...

Detailed Description

FREQM peripheral driver interface definitions.

Author
Urs Gompper urs.g.nosp@m.ompp.nosp@m.er@ml.nosp@m.-pa..nosp@m.com

Definition in file freqm.h.

#include <errno.h>
#include <mutex.h>
#include "periph_cpu.h"
#include "periph/gpio.h"
#include "time_units.h"
+ Include dependency graph for freqm.h:

Go to the source code of this file.

Typedefs

typedef void(* freqm_cb_t) (uint32_t result, bool overflow, void *context)
 Frequency meter callback function.
 
typedef uint_fast8_t freqm_t
 Define default Frequency meter type identifier.
 

Functions

void freqm_init (freqm_t idx)
 Initialize the frequency meter.
 
void freqm_frequency_get_async (freqm_t idx, freqm_cb_t freqm_cb, void *context, uint32_t period_us)
 Read number of periods of measured clock and calculate its frequency.
 
int freqm_frequency_get (freqm_t idx, uint32_t *result, uint32_t period_us)
 Read number of periods of measured clock and calculate its frequency.