Loading...
Searching...
No Matches

Low-level QDEC peripheral driver interface definitions. More...

Detailed Description

Low-level QDEC peripheral driver interface definitions.

Author
Gilles DOFFE gdoff.nosp@m.e@gm.nosp@m.ail.c.nosp@m.om

Definition in file qdec.h.

#include <stdint.h>
#include <limits.h>
#include "periph_cpu.h"
#include "periph_conf.h"
+ Include dependency graph for qdec.h:

Go to the source code of this file.

Data Structures

struct  qdec_isr_ctx_t
 Default interrupt context entry holding callback and argument. More...
 

Macros

#define QDEC_DEV(x)   (x)
 Default QDEC access macro.
 
#define QDEC_UNDEF   (UINT_FAST8_MAX)
 Default QDEC undefined value.
 

Typedefs

typedef uint_fast8_t qdec_t
 Default QDEC type definition.
 
typedef void(* qdec_cb_t) (void *arg)
 Signature of event callback functions triggered from interrupts.
 

Enumerations

enum  qdec_mode_t { QDEC_X1 , QDEC_X2 , QDEC_X4 }
 Default QDEC mode definition. More...
 

Functions

int32_t qdec_init (qdec_t dev, qdec_mode_t mode, qdec_cb_t cb, void *arg)
 Initialize a QDEC device.
 
int32_t qdec_read (qdec_t dev)
 Read the current value of the given qdec device.
 
int32_t qdec_read_and_reset (qdec_t dev)
 Read the current value of the given qdec device and reset it.
 
void qdec_start (qdec_t qdec)
 Start the given qdec timer.
 
void qdec_stop (qdec_t qdec)
 Stop the given qdec timer.