f2adba108a
Reorder the task attributes for clearity
2019-12-20 13:34:23 +01:00
132dfd8965
Fix the name of the EXTI control resource
2019-12-20 13:31:00 +01:00
f11d8dfd7e
Add resource struct field documentation
2019-12-20 13:30:40 +01:00
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
4a57a751fb
Bump the dependency on heapless to version 0.5.1
2019-12-20 13:16:19 +01:00
a2985c8132
Bump the dependencies on cortex/semihosting crates to current version
2019-12-20 13:16:19 +01:00
39e043b9e9
Port example to RTFM version 0.5
...
See https://rtfm.rs/0.5/book/en/migration.html for the migration guide.
Additional changes:
* Turned all resources into snake case (as they are struct fields now)
* Set up and enable the cycle counter (CYCCNT) for scheduling
2019-12-20 13:16:15 +01:00
8b7d68e41c
Remove the deny(warnings) attributes
...
It was suggested on the Rust Embedded channel to not set this in
released code. The warnings are currently because of the embedded-hal
crate deprecating digital::v1, but stm32f4xx-hal still using it.
2019-06-29 12:08:16 +02:00
d8e135d245
Capitalize the resource names for consistency
...
Since the resources are implemented via static mut's, it make sense
stylewise to capitalize them.
2019-06-24 22:32:40 +02:00
e0f6a87cf9
Remove trailing whitespace
2019-06-24 22:32:19 +02:00
ac8030aa4f
Improve the README a bit more
2019-04-11 20:21:59 +02:00
ebeb18e8d8
Enable running unit tests in GitLab CI
...
Do this for the library/local crate only. Not the main binary nor
the examples can be tested for the x86_64-unknown-linux-gnu target.
2019-04-11 20:10:49 +02:00
6e8de672ea
Move the led_ring module to a local crate
...
The library will allow for the tests to be actually run.
If we try to run the tests through the main binary this fails
due to missing a eh_personality language item.
2019-04-11 20:09:43 +02:00
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
2da5ca7117
Run cargo fmt
2019-04-06 23:30:15 +02:00
cf5238f4f4
Add (non-functional) tests for the led_ring
module
2019-04-06 17:47:58 +02:00
b0dae59274
Add methods to inspect LED ring mode and direction
2019-04-06 17:43:21 +02:00
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
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
8e31b2c27d
Do not use panic_semihosting during tests
2019-04-06 13:01:20 +02:00
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
6aab250e73
Also run tests during the build phase (for now)
...
Set an option for running doctests so that they can be run without
the "`eh_personality` language item not found" popping up.
See also: https://github.com/rust-lang/cargo/issues/4251
2019-04-03 08:38:00 +02:00
de70a03c11
Cache the Cargo dir and build artifacts
2019-04-02 16:11:43 +02:00
6528da79db
Remove unused example stuff from the Cargo config
2019-04-02 16:09:35 +02:00
eeb611983a
Add the thumbv7em-none-eabihf target for Rust
2019-04-02 15:48:13 +02:00
51328a5378
Improve the README
2019-04-02 15:47:57 +02:00
706419b71b
Use the arm32v7 Rust Docker image for CI
2019-04-02 12:41:25 +02:00
f1452aa884
Add GitLab CI
2019-04-02 12:28:26 +02:00
18061e094e
CLean up Cargo.toml and the code a bit (more 2018 editionish)
2019-03-20 10:30:57 +01:00
85317dcbd6
Add license and readme files
2019-03-19 08:52:48 +01:00
e496e29e09
Rename the crate (and bin) to stm32f4disc-demo
...
Do this to make explicit it works just for the STM32F4DISCOVERY board.
2019-03-17 14:22:27 +01:00
1fff7f634f
Add documentation; tiny code refactoring
2019-03-17 14:19:52 +01:00
a49a04e06f
Add basic examples
2019-03-17 13:38:36 +01:00
88793567c2
Run cargo fmt
2019-03-17 13:36:52 +01:00
7b9ee69d1a
Rename the led module to led_ring
2019-03-15 23:30:04 +01:00
a795bf910f
Clean up Cargo.toml a bit
2019-03-15 22:27:22 +01:00
d191072a3c
Add accelerometer support
2019-03-15 22:22:20 +01:00
bdd1e869c7
Output to the serial interface that initialisation is finished
2019-03-15 22:18:18 +01:00
ad809e2bc4
Rename switch_leds to cycle_leds; only spawn on init when needed
2019-03-15 22:11:27 +01:00
6ab8d98180
Refactor the LedCycle struct, impl and related enums
2019-03-15 22:08:15 +01:00
27fe066219
Handle backspace in the serial interface
2019-03-15 15:12:28 +01:00
84325d9434
Comment tweak
2019-03-12 17:27:47 +01:00
4c87af1991
Serial write actions should be blocking
2019-03-12 17:27:38 +01:00
eb9faa7593
Serial interface output tweaks
2019-03-12 16:44:59 +01:00
5c80e05263
Switch to USART2 so that serial communication actually works
2019-03-12 16:44:42 +01:00
e5b6a81841
Write button events to the serial port
2019-03-12 15:47:40 +01:00
07c4a3ccc6
Fix typos
2019-03-07 23:05:17 +01:00
9caf68f25a
Split off all the led stuff into a separate module
2019-03-07 23:03:41 +01:00
6ce7d70613
Introduce a serial command interface via USART1
2019-03-07 22:41:59 +01:00
be76045635
Introduce the LedCycle struct to bundle a lot of led cycle functionality
2019-03-07 22:40:41 +01:00