dsvensson / cc1101

A platform agnostic driver to interface with the CC1101 (Sub-1GHz RF Transceiver)
Apache License 2.0
32 stars 18 forks source link

Add timer support for various timeouts #7

Open dsvensson opened 6 years ago

dsvensson commented 6 years ago

The embedded-hal eco system defines a concept of timers. This should be passed into the constructor like the SPI and CS structures, and used in for example receive(...).

dsvensson commented 6 years ago

Sample on how to accomplish this:

https://docs.rs/embedded-hal/0.2.1/embedded_hal/#generic-programming-and-higher-level-abstractions

However.... hal::timer::CountDown is not implemented in linux-embedded-hal it seems, so that needs to happen.