Commit Graph

10 Commits

Author SHA1 Message Date
Paul van Tilburg 3fe2d062f2
Port example to stm32f4xx-hal version 0.6
* Switch to the `embedded_hal::digital::v2::OutputPin` trait
* Handle all infallable `set_low`/`set_high` calls within the
  `led_ring` module
2019-12-20 13:16:19 +01:00
Paul van Tilburg 2e23acb335
Fix the unit tests for the led_ring module
This requires the LedRing to provide access to its LEDs.
Make those available and prevent testing against some copy/clone
of the initial mock LEDs.
2019-04-11 20:07:40 +02:00
Paul van Tilburg cf5238f4f4
Add (non-functional) tests for the `led_ring` module 2019-04-06 17:47:58 +02:00
Paul van Tilburg b0dae59274
Add methods to inspect LED ring mode and direction 2019-04-06 17:43:21 +02:00
Paul van Tilburg 3730032ee6
Make the `led_ring` module work with output pins
This ensures that we can test the module by replacing real (board)
output pins by mock ones and test the module.
2019-04-06 17:38:03 +02:00
Paul van Tilburg 80fabf85e8
Move the Led struct and PERIOD const to main module
These definitions are board-specific and do not belong in the more
generic `led_ring` module.
2019-04-06 17:36:17 +02:00
Paul van Tilburg 7fef19d2fb
Rename the set_directions method on LedRing
This hopefully prevens confusion between "compass directions" and
LED ring cycle direction.
2019-04-06 12:01:49 +02:00
Paul van Tilburg 1fff7f634f Add documentation; tiny code refactoring 2019-03-17 14:19:52 +01:00
Paul van Tilburg 88793567c2 Run cargo fmt 2019-03-17 13:36:52 +01:00
Paul van Tilburg 7b9ee69d1a Rename the led module to led_ring 2019-03-15 23:30:04 +01:00