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.
This commit is contained in:
parent
2e23acb335
commit
6e8de672ea
|
@ -24,6 +24,10 @@ package = "stm32f4xx-hal"
|
|||
version = "0.3.0"
|
||||
features = ["rt", "stm32f407"]
|
||||
|
||||
[lib]
|
||||
name = "stm32f4disc_demo"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "stm32f4disc-demo"
|
||||
test = false
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#![cfg_attr(not(test), no_std)]
|
||||
pub mod led_ring;
|
|
@ -8,10 +8,8 @@
|
|||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
mod led_ring;
|
||||
|
||||
use crate::led_ring::LedRing;
|
||||
use core::fmt::Write;
|
||||
|
||||
use cortex_m_semihosting::hprintln;
|
||||
use hal::{
|
||||
block,
|
||||
|
@ -25,6 +23,7 @@ use heapless::{consts::U8, Vec};
|
|||
#[cfg(not(test))]
|
||||
use panic_semihosting as _;
|
||||
use rtfm::app;
|
||||
use stm32f4disc_demo::led_ring::LedRing;
|
||||
|
||||
type Accelerometer = hal::spi::Spi<SPI1, (Spi1Sck, Spi1Miso, Spi1Mosi)>;
|
||||
type AccelerometerCs = hal::gpio::gpioe::PE3<Output<PushPull>>;
|
||||
|
|
Loading…
Reference in New Issue