Skip to content

Commit

Permalink
Bumped version of dependant crates, updated examples to work with new…
Browse files Browse the repository at this point in the history
… crates
  • Loading branch information
MabezDev committed Oct 23, 2018
1 parent a372a82 commit f0237d0
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 111 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.2.4] - 2018-10-32

### Fixed
- Updated examples and bumped dependancies.

## [v0.2.3] - 2018-10-06

### Fixed
Expand Down Expand Up @@ -49,7 +54,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

- Initial release

[Unreleased]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.3...HEAD
[Unreleased]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.4...HEAD
[v0.2.4]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.3...v0.2.4
[v0.2.3]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.2...v0.2.3
[v0.2.2]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/mabezdev/stm32l432xx-hal/compare/v0.2.0...v0.2.1
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stm32l432xx-hal"
version = "0.2.3"
version = "0.2.4"
authors = ["Scott Mabin <[email protected]>"]
description = "Hardware abstraction layer for the stm32l432xx chips"
keywords = ["no-std", "stm32l432xx", "stm32l432kc", "embedded", "embedded-hal"]
Expand All @@ -15,7 +15,7 @@ exclude = [
]

[dependencies]
cortex-m = "0.5.2"
cortex-m = "0.5.7"
nb = "0.1.1"

[dependencies.cast]
Expand All @@ -31,13 +31,13 @@ version = "0.2.1"
features = ["unproven"]

[dependencies.stm32l4]
version = "0.2.1"
version = "0.3.2"
features = ["stm32l4x2", "rt"]

[dev-dependencies]
panic-semihosting = "0.3.0"
cortex-m-semihosting = "0.3.0"
cortex-m-rt = "0.5.1"
panic-semihosting = "0.5.0"
cortex-m-semihosting = "0.3.1"
cortex-m-rt = "0.6.5"

[profile.dev]
incremental = false
Expand Down
16 changes: 4 additions & 12 deletions examples/blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ use rt::ExceptionFrame;
use core::fmt::Write;
use sh::hio;

entry!(main);

#[entry]
fn main() -> ! {

let mut hstdout = hio::hstdout().unwrap();
Expand Down Expand Up @@ -61,14 +60,7 @@ fn main() -> ! {
}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
}
14 changes: 3 additions & 11 deletions examples/pll_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ use hal::stm32l4::stm32l4x2;
use hal::rcc::PllConfig;
use rt::ExceptionFrame;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();

Expand Down Expand Up @@ -75,14 +74,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
16 changes: 4 additions & 12 deletions examples/rtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ use rt::ExceptionFrame;
use core::fmt::Write;
use sh::hio;

entry!(main);

#[entry]
fn main() -> ! {

let mut hstdout = hio::hstdout().unwrap();
Expand Down Expand Up @@ -66,14 +65,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
}
14 changes: 3 additions & 11 deletions examples/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ use hal::serial::Serial;
use hal::stm32l4::stm32l4x2;
use rt::ExceptionFrame;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();

Expand Down Expand Up @@ -67,14 +66,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
14 changes: 3 additions & 11 deletions examples/serial_dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ use hal::serial::Serial;
use hal::stm32l4::stm32l4x2;
use rt::ExceptionFrame;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();

Expand Down Expand Up @@ -90,14 +89,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
14 changes: 3 additions & 11 deletions examples/serial_dma_partial_peek.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ use hal::stm32l4::stm32l4x2;
use rt::ExceptionFrame;
use hal::delay::Delay;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();
let cp = cortex_m::Peripherals::take().unwrap();
Expand Down Expand Up @@ -82,14 +81,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
14 changes: 3 additions & 11 deletions examples/serial_vcom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ use hal::serial::Serial;
use hal::stm32l4::stm32l4x2;
use rt::ExceptionFrame;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();

Expand Down Expand Up @@ -71,14 +70,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
14 changes: 3 additions & 11 deletions examples/spi_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ pub const MODE: Mode = Mode {
polarity: Polarity::IdleLow,
};

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();

Expand Down Expand Up @@ -82,14 +81,7 @@ fn main() -> ! {
loop {}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
14 changes: 3 additions & 11 deletions examples/touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use hal::stm32l4::stm32l4x2;
use hal::tsc::Tsc;
use rt::ExceptionFrame;

entry!(main);

#[entry]
fn main() -> ! {
let p = stm32l4x2::Peripherals::take().unwrap();
// let cp = cortex_m::Peripherals::take().unwrap();
Expand Down Expand Up @@ -62,14 +61,7 @@ fn main() -> ! {
}
}

exception!(HardFault, hard_fault);

fn hard_fault(ef: &ExceptionFrame) -> ! {
#[exception]
fn HardFault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}

exception!(*, default_handler);

fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
6 changes: 3 additions & 3 deletions src/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,18 @@ macro_rules! hal {
{
{
let buffer: &[u8] = &buffer[0];
chan.cmar().write(|w| unsafe {
chan.cmar().write(|w| {
w.ma().bits(buffer.as_ptr() as usize as u32)
});
chan.cndtr().write(|w| unsafe{
chan.cndtr().write(|w|{
w.ndt().bits((buffer.len() * 2) as u16)
});
chan.cpar().write(|w| unsafe {
w.pa().bits(&(*$USARTX::ptr()).rdr as *const _ as usize as u32)
});

// Tell DMA to request from serial
chan.cselr().write(|w| unsafe {
chan.cselr().write(|w| {
w.$dmacsr().bits(0010)
});

Expand Down

0 comments on commit f0237d0

Please sign in to comment.