CLean up Cargo.toml and the code a bit (more 2018 editionish)
This commit is contained in:
parent
85317dcbd6
commit
18061e094e
|
@ -1,15 +1,18 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "stm32f4disc-demo"
|
||||
version = "0.1.0"
|
||||
categories = ["embedded", "no-std"]
|
||||
description = "Some STM32F4DISCOVERY board demo application"
|
||||
license = "0BSD"
|
||||
authors = ["Paul van Tilburg <paul@luon.net>"]
|
||||
edition = "2018"
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
cortex-m = "0.5.8"
|
||||
cortex-m-rt = "0.6.5"
|
||||
cortex-m-semihosting = "0.3.2"
|
||||
heapless = "0.4.2"
|
||||
panic-halt = "0.2.0"
|
||||
panic-semihosting = "0.5.1"
|
||||
|
||||
[dependencies.cortex-m-rtfm]
|
||||
|
|
20
src/main.rs
20
src/main.rs
|
@ -8,21 +8,21 @@
|
|||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
extern crate panic_semihosting;
|
||||
|
||||
mod led_ring;
|
||||
|
||||
use crate::led_ring::{Led, LedRing};
|
||||
use core::fmt::Write;
|
||||
use cortex_m_semihosting::hprintln;
|
||||
use hal::block;
|
||||
use hal::gpio::{Alternate, Edge, ExtiPin, Floating, Input, Output, PushPull, AF5};
|
||||
use hal::prelude::*;
|
||||
use hal::serial::{self, config::Config as SerialConfig, Serial};
|
||||
use hal::spi::{Mode, Phase, Polarity, Spi};
|
||||
use hal::stm32::{EXTI, SPI1, USART2};
|
||||
use heapless::consts::U8;
|
||||
use heapless::Vec;
|
||||
use hal::{
|
||||
block,
|
||||
gpio::{Alternate, Edge, ExtiPin, Floating, Input, Output, PushPull, AF5},
|
||||
prelude::*,
|
||||
serial::{self, config::Config as SerialConfig, Serial},
|
||||
spi::{Mode, Phase, Polarity, Spi},
|
||||
stm32::{EXTI, SPI1, USART2},
|
||||
};
|
||||
use heapless::{consts::U8, Vec};
|
||||
use panic_semihosting as _;
|
||||
use rtfm::app;
|
||||
|
||||
type Accelerometer = hal::spi::Spi<SPI1, (Spi1Sck, Spi1Miso, Spi1Mosi)>;
|
||||
|
|
Loading…
Reference in New Issue