Crate qei[][src]

This crate allows you to wrap a Qei counter in a larger type. This is usefull when your Timer counter is on 16 bit and spend a lot of time overflowing/underflowing. To use this wrapper you have to take samples regularly, but be carefull because the counter should not change for more than (2^16 - 1)/2 between two samples otherwise we can not detect overflows/underflows.

The internal counter is an i64 which should be enough for most use cases.

An example is provided for the stm32f103 µcontroller in this repository.

Structs

QeiManager

Extend a Qei peripherals by tracking overflows and underflows.

Enums

SamplingError

The error returned when we update the internal counter