librfn
An ad-hoc utility library
Macros | Functions
rotenc.c File Reference
#include "librfn/rotenc.h"

Go to the source code of this file.

Macros

#define FROM(x, y)   (((!!x) << 3) + ((!!y) << 2))
 
#define TO(x, y)   (((!!x) << 1) + (!!y))
 

Functions

void rotenc_decode (rotenc_t *r, uint8_t state)
 Handle a state update. More...
 
uint16_t rotenc_count14 (rotenc_t *r)
 Read a 14-bit count of the current knob position. More...
 

Macro Definition Documentation

#define FROM (   x,
 
)    (((!!x) << 3) + ((!!y) << 2))
#define TO (   x,
 
)    (((!!x) << 1) + (!!y))