Compare commits
17 Commits
va416xx-ha
...
va416xx-ha
Author | SHA1 | Date | |
---|---|---|---|
1a5670b362 | |||
2b8a9dbce4 | |||
6528dd855f | |||
4455cb0343 | |||
2706dbf461
|
|||
c3e16b4278
|
|||
2088d7dc8a
|
|||
a44ba7b8a5 | |||
a3c6366e98 | |||
016c421cb8
|
|||
0e99e04dd1
|
|||
aea3d835f0 | |||
5f39b916fa
|
|||
6d8a114f49 | |||
969f0f4ca5 | |||
b6971ab7eb | |||
41b215e326
|
12
README.md
12
README.md
@ -14,7 +14,7 @@ This workspace contains the following crates:
|
|||||||
PAC crate containing basic low-level register definition
|
PAC crate containing basic low-level register definition
|
||||||
- The [`va416xx-hal`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va416xx-hal)
|
- The [`va416xx-hal`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va416xx-hal)
|
||||||
HAL crate containing higher-level abstractions on top of the PAC register crate.
|
HAL crate containing higher-level abstractions on top of the PAC register crate.
|
||||||
- The [`va416xx-embassy`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va108xx-embassy)
|
- The [`va416xx-embassy`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va416xx-embassy)
|
||||||
crate containing support for running the embassy-rs RTOS.
|
crate containing support for running the embassy-rs RTOS.
|
||||||
- The [`vorago-peb1`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/vorago-peb1)
|
- The [`vorago-peb1`](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/vorago-peb1)
|
||||||
BSP crate containing support for the PEB1 development board.
|
BSP crate containing support for the PEB1 development board.
|
||||||
@ -155,3 +155,13 @@ example.
|
|||||||
The Segger RTT viewer can be used to display log messages received from the target. The base
|
The Segger RTT viewer can be used to display log messages received from the target. The base
|
||||||
address for the RTT block placement is 0x1fff8000. It is recommended to use a search range of
|
address for the RTT block placement is 0x1fff8000. It is recommended to use a search range of
|
||||||
0x1000 around that base address when using the RTT viewer.
|
0x1000 around that base address when using the RTT viewer.
|
||||||
|
|
||||||
|
## Learning (Embedded) Rust
|
||||||
|
|
||||||
|
If you are unfamiliar with Rust on Embedded Systems or Rust in general, the following resources
|
||||||
|
are recommended:
|
||||||
|
|
||||||
|
- [Rust Book](https://doc.rust-lang.org/book/)
|
||||||
|
- [Embedded Rust Book](https://docs.rust-embedded.org/book/)
|
||||||
|
- [Embedded Rust Discovery](https://docs.rust-embedded.org/discovery/microbit/)
|
||||||
|
- [Awesome Embedded Rust](https://github.com/rust-embedded/awesome-embedded-rust)
|
||||||
|
@ -7,14 +7,14 @@ edition = "2021"
|
|||||||
cortex-m = "0.7"
|
cortex-m = "0.7"
|
||||||
cortex-m-rt = "0.7"
|
cortex-m-rt = "0.7"
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
panic-rtt-target = { version = "0.1.3" }
|
panic-rtt-target = { version = "0.2" }
|
||||||
panic-halt = { version = "0.2" }
|
panic-halt = { version = "1" }
|
||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.6" }
|
||||||
crc = "3"
|
crc = "3"
|
||||||
static_assertions = "1"
|
static_assertions = "1"
|
||||||
|
|
||||||
[dependencies.va416xx-hal]
|
[dependencies.va416xx-hal]
|
||||||
path = "../va416xx-hal"
|
version = "0.5"
|
||||||
features = ["va41630"]
|
features = ["va41630"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
@ -12,9 +12,9 @@ embedded-io = "0.6"
|
|||||||
embedded-hal-async = "1"
|
embedded-hal-async = "1"
|
||||||
embedded-io-async = "0.6"
|
embedded-io-async = "0.6"
|
||||||
|
|
||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.6" }
|
||||||
heapless = "0.8"
|
heapless = "0.8"
|
||||||
panic-rtt-target = { version = "0.1" }
|
panic-rtt-target = { version = "0.2" }
|
||||||
static_cell = "2"
|
static_cell = "2"
|
||||||
critical-section = "1"
|
critical-section = "1"
|
||||||
once_cell = { version = "1", default-features = false, features = ["critical-section"] }
|
once_cell = { version = "1", default-features = false, features = ["critical-section"] }
|
||||||
@ -28,11 +28,8 @@ embassy-executor = { version = "0.7", features = [
|
|||||||
"executor-interrupt"
|
"executor-interrupt"
|
||||||
]}
|
]}
|
||||||
|
|
||||||
va416xx-embassy = { path = "../../va416xx-embassy", default-features = false }
|
va416xx-hal = { version = "0.5" }
|
||||||
|
va416xx-embassy = { version = "0.1", default-features = false }
|
||||||
[dependencies.va416xx-hal]
|
|
||||||
path = "../../va416xx-hal"
|
|
||||||
features = ["va41630"]
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["ticks-hz-1_000", "va416xx-embassy/irq-tim14-tim15"]
|
default = ["ticks-hz-1_000", "va416xx-embassy/irq-tim14-tim15"]
|
||||||
|
@ -132,7 +132,7 @@ fn UART0_RX() {
|
|||||||
RX.lock(|static_rx| {
|
RX.lock(|static_rx| {
|
||||||
let mut rx_borrow = static_rx.borrow_mut();
|
let mut rx_borrow = static_rx.borrow_mut();
|
||||||
let rx_mut_ref = rx_borrow.as_mut().unwrap();
|
let rx_mut_ref = rx_borrow.as_mut().unwrap();
|
||||||
let result = rx_mut_ref.irq_handler(&mut buf);
|
let result = rx_mut_ref.on_interrupt(&mut buf);
|
||||||
read_len = result.bytes_read;
|
read_len = result.bytes_read;
|
||||||
if result.errors.is_some() {
|
if result.errors.is_some() {
|
||||||
errors = result.errors;
|
errors = result.errors;
|
||||||
|
@ -7,13 +7,11 @@ edition = "2021"
|
|||||||
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
||||||
cortex-m-rt = "0.7"
|
cortex-m-rt = "0.7"
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.6" }
|
||||||
rtic-sync = { version = "1.3", features = ["defmt-03"] }
|
rtic-sync = { version = "1.3", features = ["defmt-03"] }
|
||||||
panic-rtt-target = { version = "0.1.3" }
|
panic-rtt-target = { version = "0.2" }
|
||||||
|
|
||||||
[dependencies.va416xx-hal]
|
va416xx-hal = { version = "0.5", features = ["va41630"] }
|
||||||
path = "../../va416xx-hal"
|
|
||||||
features = ["va41630"]
|
|
||||||
|
|
||||||
[dependencies.rtic]
|
[dependencies.rtic]
|
||||||
version = "2"
|
version = "2"
|
||||||
|
@ -7,17 +7,16 @@ edition = "2021"
|
|||||||
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
||||||
cortex-m-rt = "0.7"
|
cortex-m-rt = "0.7"
|
||||||
critical-section = "1"
|
critical-section = "1"
|
||||||
panic-rtt-target = { version = "0.1.3" }
|
panic-rtt-target = { version = "0.2" }
|
||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.6" }
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
embedded-hal-nb = "1"
|
embedded-hal-nb = "1"
|
||||||
nb = "1"
|
nb = "1"
|
||||||
embedded-io = "0.6"
|
embedded-io = "0.6"
|
||||||
panic-halt = "0.2"
|
panic-halt = "1"
|
||||||
accelerometer = "0.12"
|
accelerometer = "0.12"
|
||||||
|
|
||||||
[dependencies.va416xx-hal]
|
va416xx-hal = { version = "0.5", features = ["va41630"] }
|
||||||
path = "../../va416xx-hal"
|
|
||||||
|
|
||||||
[dependencies.vorago-peb1]
|
[dependencies.vorago-peb1]
|
||||||
path = "../../vorago-peb1"
|
path = "../../vorago-peb1"
|
||||||
|
@ -9,44 +9,20 @@ cortex-m-rt = "0.7"
|
|||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
embedded-hal-nb = "1"
|
embedded-hal-nb = "1"
|
||||||
embedded-io = "0.6"
|
embedded-io = "0.6"
|
||||||
panic-rtt-target = { version = "0.1.3" }
|
panic-rtt-target = { version = "0.2" }
|
||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.6" }
|
||||||
rtt-log = "0.3"
|
rtt-log = "0.5"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
crc = "3"
|
crc = "3"
|
||||||
rtic-sync = "1"
|
rtic-sync = "1"
|
||||||
static_cell = "2"
|
static_cell = "2"
|
||||||
|
satrs = { version = "0.3.0-alpha.0", default-features = false }
|
||||||
|
ringbuf = { version = "0.4", default-features = false }
|
||||||
|
once_cell = { version = "1", default-features = false, features = ["critical-section"] }
|
||||||
|
spacepackets = { version = "0.13", default-features = false }
|
||||||
|
cobs = { version = "0.3", default-features = false }
|
||||||
|
|
||||||
[dependencies.satrs]
|
va416xx-hal = { version = "0.5", features = ["va41630"] }
|
||||||
version = "0.2"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[dependencies.ringbuf]
|
rtic = { version = "2", features = ["thumbv7-backend"] }
|
||||||
version = "0.4"
|
rtic-monotonics = { version = "2", features = ["cortex-m-systick"] }
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[dependencies.once_cell]
|
|
||||||
version = "1"
|
|
||||||
default-features = false
|
|
||||||
features = ["critical-section"]
|
|
||||||
|
|
||||||
[dependencies.spacepackets]
|
|
||||||
version = "0.11"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[dependencies.cobs]
|
|
||||||
git = "https://github.com/robamu/cobs.rs.git"
|
|
||||||
branch = "all_features"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[dependencies.va416xx-hal]
|
|
||||||
path = "../va416xx-hal"
|
|
||||||
features = ["va41630"]
|
|
||||||
|
|
||||||
[dependencies.rtic]
|
|
||||||
version = "2"
|
|
||||||
features = ["thumbv7-backend"]
|
|
||||||
|
|
||||||
[dependencies.rtic-monotonics]
|
|
||||||
version = "2"
|
|
||||||
features = ["cortex-m-systick"]
|
|
||||||
|
@ -11,7 +11,7 @@ panic-rtt-target = { version = "0.1.3" }
|
|||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.5" }
|
||||||
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
va416xx-hal = { path = "../../va416xx-hal", features = ["va41630"] }
|
va416xx-hal = { path = "0.4", features = ["va41630"] }
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
@ -11,7 +11,7 @@ panic-rtt-target = { version = "0.1.3" }
|
|||||||
rtt-target = { version = "0.5" }
|
rtt-target = { version = "0.5" }
|
||||||
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
va416xx-hal = { path = "../../va416xx-hal", features = ["va41630"] }
|
va416xx-hal = { path = "0.4", features = ["va41630"] }
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
@ -256,7 +256,7 @@ mod app {
|
|||||||
match cx
|
match cx
|
||||||
.local
|
.local
|
||||||
.uart_rx
|
.uart_rx
|
||||||
.irq_handler_max_size_or_timeout_based(cx.local.rx_context, cx.local.rx_buf)
|
.on_interrupt_max_size_or_timeout_based(cx.local.rx_context, cx.local.rx_buf)
|
||||||
{
|
{
|
||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
if RX_DEBUGGING {
|
if RX_DEBUGGING {
|
||||||
|
@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## [unreleased]
|
## [unreleased]
|
||||||
|
|
||||||
## [v0.1.0] 2025-02-13
|
## [v0.1.1] 2025-03-07
|
||||||
|
|
||||||
|
- Bumped allowed HAL dependency to v0.5
|
||||||
|
|
||||||
|
## [v0.1.0] 2025-02-18
|
||||||
|
|
||||||
Initial release
|
Initial release
|
||||||
|
|
||||||
|
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-embassy-v0.1.1...HEAD
|
||||||
|
[v0.1.1]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-embassy-v0.1.0...va416xx-embassy-v0.1.1
|
||||||
|
[v0.1.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/tag/va416xx-embassy-v0.1.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "va416xx-embassy"
|
name = "va416xx-embassy"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
description = "Embassy-rs support for the Vorago VA416xx family of microcontrollers"
|
description = "Embassy-rs support for the Vorago VA416xx family of microcontrollers"
|
||||||
@ -21,17 +21,20 @@ portable-atomic = "1"
|
|||||||
|
|
||||||
once_cell = { version = "1", default-features = false, features = ["critical-section"] }
|
once_cell = { version = "1", default-features = false, features = ["critical-section"] }
|
||||||
|
|
||||||
va416xx-hal = { version = "0.4", path = "../va416xx-hal" }
|
va416xx-hal = { version = ">=0.4, <=0.5" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["irq-tim14-tim15"]
|
default = ["irq-tim14-tim15"]
|
||||||
irqs-in-lib = []
|
|
||||||
# This determines the reserved interrupt functions for the embassy time drivers. Only one
|
# This determines the reserved interrupt functions for the embassy time drivers. Only one
|
||||||
# is allowed to be selected!
|
# is allowed to be selected!
|
||||||
irq-tim14-tim15 = ["irqs-in-lib"]
|
irq-tim14-tim15 = ["_irqs-in-lib"]
|
||||||
irq-tim13-tim14 = ["irqs-in-lib"]
|
irq-tim13-tim14 = ["_irqs-in-lib"]
|
||||||
# These TIMs are clocked slower!
|
# These TIMs are clocked slower!
|
||||||
irq-tim22-tim23 = ["irqs-in-lib"]
|
irq-tim22-tim23 = ["_irqs-in-lib"]
|
||||||
|
|
||||||
|
# Private feature.
|
||||||
|
_irqs-in-lib = []
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = ["--generate-link-to-definition"]
|
rustdoc-args = ["--generate-link-to-definition"]
|
||||||
|
@ -136,13 +136,13 @@ pub unsafe fn init<
|
|||||||
alarm: AlarmTim,
|
alarm: AlarmTim,
|
||||||
clocks: &Clocks,
|
clocks: &Clocks,
|
||||||
) {
|
) {
|
||||||
#[cfg(feature = "irqs-in-lib")]
|
#[cfg(feature = "_irqs-in-lib")]
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
TimekeeperTim::ID,
|
TimekeeperTim::ID,
|
||||||
TIMEKEEPER_IRQ as u8 - TIM_IRQ_OFFSET as u8,
|
TIMEKEEPER_IRQ as u8 - TIM_IRQ_OFFSET as u8,
|
||||||
"Timekeeper TIM and IRQ missmatch"
|
"Timekeeper TIM and IRQ missmatch"
|
||||||
);
|
);
|
||||||
#[cfg(feature = "irqs-in-lib")]
|
#[cfg(feature = "_irqs-in-lib")]
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
AlarmTim::ID,
|
AlarmTim::ID,
|
||||||
ALARM_IRQ as u8 - TIM_IRQ_OFFSET as u8,
|
ALARM_IRQ as u8 - TIM_IRQ_OFFSET as u8,
|
||||||
|
@ -8,6 +8,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v0.5.1] 2025-03-10
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fix `embedded_io` UART implementation to implement the documented contract properly.
|
||||||
|
The implementation will now block until at least one byte is available or can be written, unless
|
||||||
|
the send or receive buffer is empty.
|
||||||
|
|
||||||
|
# [v0.5.0] 2025-03-07
|
||||||
|
|
||||||
|
- Bugfix for I2C `TimingCfg::reg`
|
||||||
|
- Simplified UART error handling. All APIs are now infallible because writing to a FIFO or
|
||||||
|
reading from a FIFO never fails. Users can either poll errors using `Rx::poll_errors` or
|
||||||
|
`Uart::poll_rx_errors` / `UartBase::poll_rx_errors`, or detect errors using the provided
|
||||||
|
interrupt handlers.
|
||||||
|
|
||||||
|
# [v0.4.1] 2025-02-18
|
||||||
|
|
||||||
|
- Chip selection is not enforced anymore, but advised through documentation. This makes using
|
||||||
|
the HAL in libraries a lot easier.
|
||||||
|
|
||||||
# [v0.4.0] 2025-02-18
|
# [v0.4.0] 2025-02-18
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
@ -96,3 +117,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
# [v0.1.0] 2024-07-01
|
# [v0.1.0] 2024-07-01
|
||||||
|
|
||||||
- Initial release with basic HAL drivers
|
- Initial release with basic HAL drivers
|
||||||
|
|
||||||
|
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.5.0...HEAD
|
||||||
|
[v0.5.1]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.5.0...va416xx-hal-v0.5.1
|
||||||
|
[v0.5.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.4.1...va416xx-hal-v0.5.0
|
||||||
|
[v0.4.1]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.4.0...va416xx-hal-v0.4.1
|
||||||
|
[v0.4.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.3.0...va416xx-hal-v0.4.0
|
||||||
|
[v0.3.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.2.0...va108xx-hal-v0.3.0
|
||||||
|
[v0.2.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/va416xx-hal-v0.1.0...va108xx-hal-v0.2.0
|
||||||
|
[v0.1.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/tag/va416xx-hal-v0.1.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "va416xx-hal"
|
name = "va416xx-hal"
|
||||||
version = "0.4.0"
|
version = "0.5.1"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "HAL for the Vorago VA416xx family of MCUs"
|
description = "HAL for the Vorago VA416xx family of MCUs"
|
||||||
@ -23,9 +23,9 @@ embedded-io-async = "0.6"
|
|||||||
num_enum = { version = "0.7", default-features = false }
|
num_enum = { version = "0.7", default-features = false }
|
||||||
typenum = "1"
|
typenum = "1"
|
||||||
bitflags = "2"
|
bitflags = "2"
|
||||||
bitfield = "0.17"
|
bitfield = { version = ">=0.17, <=0.18"}
|
||||||
fugit = "0.3"
|
fugit = "0.3"
|
||||||
delegate = "0.12"
|
delegate = ">=0.12, <=0.13"
|
||||||
heapless = "0.8"
|
heapless = "0.8"
|
||||||
void = { version = "1", default-features = false }
|
void = { version = "1", default-features = false }
|
||||||
thiserror = { version = "2", default-features = false }
|
thiserror = { version = "2", default-features = false }
|
||||||
|
@ -11,14 +11,17 @@ raw PAC. This crate also implements traits specified by the
|
|||||||
[embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with
|
[embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with
|
||||||
various drivers in the embedded rust ecosystem.
|
various drivers in the embedded rust ecosystem.
|
||||||
|
|
||||||
You have to enable one of the following device features to use this crate depending on
|
It is generally advised to enable ONE of the following device features to use this crate
|
||||||
which chip you are using:
|
depending on which chip you are using:
|
||||||
|
|
||||||
- `va41630`
|
- `va41630`
|
||||||
- `va41629`
|
- `va41629`
|
||||||
- `va41628`
|
- `va41628`
|
||||||
- `va41620`
|
- `va41620`
|
||||||
|
|
||||||
|
If no chip is specified, only access to APIs which are common for all families or
|
||||||
|
which are not disabled for specific families is granted.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Building an application requires the `thumbv7em-none-eabihf` cross-compiler toolchain.
|
Building an application requires the `thumbv7em-none-eabihf` cross-compiler toolchain.
|
||||||
|
@ -212,13 +212,13 @@ impl TimingCfg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn reg(&self) -> u32 {
|
pub fn reg(&self) -> u32 {
|
||||||
(self.tbuf as u32) << 28
|
((self.tbuf as u32) << 28)
|
||||||
| (self.thd_sta as u32) << 24
|
| ((self.thd_sta as u32) << 24)
|
||||||
| (self.tsu_sta as u32) << 20
|
| ((self.tsu_sta as u32) << 20)
|
||||||
| (self.tsu_sto as u32) << 16
|
| ((self.tsu_sto as u32) << 16)
|
||||||
| (self.tlow as u32) << 12
|
| ((self.tlow as u32) << 12)
|
||||||
| (self.thigh as u32) << 8
|
| ((self.thigh as u32) << 8)
|
||||||
| (self.tf as u32) << 4
|
| ((self.tf as u32) << 4)
|
||||||
| (self.tr as u32)
|
| (self.tr as u32)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ impl<I2c: Instance> I2cBase<I2c> {
|
|||||||
if let Some(max_words) = max_words {
|
if let Some(max_words) = max_words {
|
||||||
self.i2c
|
self.i2c
|
||||||
.s0_maxwords()
|
.s0_maxwords()
|
||||||
.write(|w| unsafe { w.bits(1 << 31 | max_words as u32) });
|
.write(|w| unsafe { w.bits((1 << 31) | max_words as u32) });
|
||||||
}
|
}
|
||||||
let (addr, addr_mode_mask) = Self::unwrap_addr(sl_cfg.addr);
|
let (addr, addr_mode_mask) = Self::unwrap_addr(sl_cfg.addr);
|
||||||
// The first bit is the read/write value. Normally, both read and write are matched
|
// The first bit is the read/write value. Normally, both read and write are matched
|
||||||
@ -451,7 +451,7 @@ impl<I2c: Instance> I2cBase<I2c> {
|
|||||||
let clk_div = self.calc_clk_div(speed_mode)?;
|
let clk_div = self.calc_clk_div(speed_mode)?;
|
||||||
self.i2c
|
self.i2c
|
||||||
.clkscale()
|
.clkscale()
|
||||||
.write(|w| unsafe { w.bits((speed_mode as u32) << 31 | clk_div as u32) });
|
.write(|w| unsafe { w.bits(((speed_mode as u32) << 31) | clk_div as u32) });
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,23 @@
|
|||||||
//! This is the **H**ardware **A**bstraction **L**ayer (HAL) for the VA416xx MCU family.
|
//! This is the **H**ardware **A**bstraction **L**ayer (HAL) for the VA416xx MCU family.
|
||||||
//!
|
//!
|
||||||
//! It is an additional hardware abstraction on top of the [peripheral access API](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va416xx).
|
//! It is an additional hardware abstraction on top of the [peripheral access API](https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/branch/main/va416xx).
|
||||||
|
//!
|
||||||
//! It is the result of reading the datasheet for the device and encoding a type-safe layer over the
|
//! It is the result of reading the datasheet for the device and encoding a type-safe layer over the
|
||||||
//! raw PAC. This crate also implements traits specified by the
|
//! raw PAC. This crate also implements traits specified by the
|
||||||
//! [embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with
|
//! [embedded-hal](https://github.com/rust-embedded/embedded-hal) project, making it compatible with
|
||||||
//! various drivers in the embedded rust ecosystem.
|
//! various drivers in the embedded rust ecosystem.
|
||||||
|
//!
|
||||||
//! You have to enable one of the following device features to use this crate depending on
|
//! It is generally advised to enable ONE of the following device features to use this crate
|
||||||
//! which chip you are using:
|
//! depending on which chip you are using:
|
||||||
|
//!
|
||||||
//! - `va41630`
|
//! - `va41630`
|
||||||
//! - `va41629`
|
//! - `va41629`
|
||||||
//! - `va41628`
|
//! - `va41628`
|
||||||
//! - `va41620`
|
//! - `va41620`
|
||||||
//!
|
//!
|
||||||
|
//! If no option is specified, only access to APIs which are common for all families or
|
||||||
|
//! which are not disabled for specific families is granted.
|
||||||
|
//!
|
||||||
//! When using this HAL and writing applications for the VA416xx family in general, it is strongly
|
//! When using this HAL and writing applications for the VA416xx family in general, it is strongly
|
||||||
//! recommended that you set up the clock properly, because the default internal HBO clock
|
//! recommended that you set up the clock properly, because the default internal HBO clock
|
||||||
//! is not very accurate. You can use the [crate::clock] module for this. If you are working
|
//! is not very accurate. You can use the [crate::clock] module for this. If you are working
|
||||||
@ -26,15 +29,6 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate std;
|
extern crate std;
|
||||||
|
|
||||||
#[cfg(not(feature = "device-selected"))]
|
|
||||||
compile_error!(
|
|
||||||
"This crate requires one of the following device features enabled:
|
|
||||||
va41630
|
|
||||||
va41629
|
|
||||||
va41628
|
|
||||||
"
|
|
||||||
);
|
|
||||||
|
|
||||||
use gpio::Port;
|
use gpio::Port;
|
||||||
pub use va416xx as device;
|
pub use va416xx as device;
|
||||||
pub use va416xx as pac;
|
pub use va416xx as pac;
|
||||||
|
@ -82,56 +82,6 @@ impl RxPin<Uart2> for Pin<PF9, AltFunc1> {}
|
|||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub struct TransferPendingError;
|
pub struct TransferPendingError;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
||||||
pub enum RxError {
|
|
||||||
Overrun,
|
|
||||||
Framing,
|
|
||||||
Parity,
|
|
||||||
}
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
||||||
pub enum Error {
|
|
||||||
Rx(RxError),
|
|
||||||
BreakCondition,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<RxError> for Error {
|
|
||||||
fn from(value: RxError) -> Self {
|
|
||||||
Self::Rx(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl embedded_io::Error for Error {
|
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
|
||||||
embedded_io::ErrorKind::Other
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl embedded_io::Error for RxError {
|
|
||||||
fn kind(&self) -> embedded_io::ErrorKind {
|
|
||||||
embedded_io::ErrorKind::Other
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl embedded_hal_nb::serial::Error for RxError {
|
|
||||||
fn kind(&self) -> embedded_hal_nb::serial::ErrorKind {
|
|
||||||
match self {
|
|
||||||
RxError::Overrun => embedded_hal_nb::serial::ErrorKind::Overrun,
|
|
||||||
RxError::Framing => embedded_hal_nb::serial::ErrorKind::FrameFormat,
|
|
||||||
RxError::Parity => embedded_hal_nb::serial::ErrorKind::Parity,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl embedded_hal_nb::serial::Error for Error {
|
|
||||||
fn kind(&self) -> embedded_hal_nb::serial::ErrorKind {
|
|
||||||
match self {
|
|
||||||
Error::Rx(rx_error) => embedded_hal_nb::serial::Error::kind(rx_error),
|
|
||||||
Error::BreakCondition => embedded_hal_nb::serial::ErrorKind::Other,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Event {
|
pub enum Event {
|
||||||
@ -626,22 +576,27 @@ impl<Uart: Instance> UartBase<Uart> {
|
|||||||
self.uart
|
self.uart
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Poll receiver errors.
|
||||||
|
pub fn poll_rx_errors(&self) -> Option<UartErrors> {
|
||||||
|
self.rx.poll_errors()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn split(self) -> (Tx<Uart>, Rx<Uart>) {
|
pub fn split(self) -> (Tx<Uart>, Rx<Uart>) {
|
||||||
(self.tx, self.rx)
|
(self.tx, self.rx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<UartInstance> embedded_io::ErrorType for UartBase<UartInstance> {
|
impl<UartInstance> embedded_io::ErrorType for UartBase<UartInstance> {
|
||||||
type Error = Error;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<UartInstance> embedded_hal_nb::serial::ErrorType for UartBase<UartInstance> {
|
impl<UartInstance> embedded_hal_nb::serial::ErrorType for UartBase<UartInstance> {
|
||||||
type Error = Error;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Uart: Instance> embedded_hal_nb::serial::Read<u8> for UartBase<Uart> {
|
impl<Uart: Instance> embedded_hal_nb::serial::Read<u8> for UartBase<Uart> {
|
||||||
fn read(&mut self) -> nb::Result<u8, Self::Error> {
|
fn read(&mut self) -> nb::Result<u8, Self::Error> {
|
||||||
self.rx.read().map_err(|e| e.map(Error::Rx))
|
self.rx.read()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,6 +684,8 @@ impl<TxPinInst: TxPin<UartInstance>, RxPinInst: RxPin<UartInstance>, UartInstanc
|
|||||||
|
|
||||||
delegate::delegate! {
|
delegate::delegate! {
|
||||||
to self.inner {
|
to self.inner {
|
||||||
|
/// Poll receiver errors.
|
||||||
|
pub fn poll_rx_errors(&self) -> Option<UartErrors>;
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn enable_rx(&mut self);
|
pub fn enable_rx(&mut self);
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -813,6 +770,23 @@ impl<Uart: Instance> Rx<Uart> {
|
|||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn poll_errors(&self) -> Option<UartErrors> {
|
||||||
|
let mut errors = UartErrors::default();
|
||||||
|
|
||||||
|
let uart = unsafe { &(*Uart::ptr()) };
|
||||||
|
let status_reader = uart.rxstatus().read();
|
||||||
|
if status_reader.rxovr().bit_is_set() {
|
||||||
|
errors.overflow = true;
|
||||||
|
} else if status_reader.rxfrm().bit_is_set() {
|
||||||
|
errors.framing = true;
|
||||||
|
} else if status_reader.rxpar().bit_is_set() {
|
||||||
|
errors.parity = true;
|
||||||
|
} else {
|
||||||
|
return None;
|
||||||
|
};
|
||||||
|
Some(errors)
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn clear_fifo(&self) {
|
pub fn clear_fifo(&self) {
|
||||||
self.0.fifo_clr().write(|w| w.rxfifo().set_bit());
|
self.0.fifo_clr().write(|w| w.rxfifo().set_bit());
|
||||||
@ -874,34 +848,15 @@ impl<Uart: Instance> Rx<Uart> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<Uart> embedded_io::ErrorType for Rx<Uart> {
|
impl<Uart> embedded_io::ErrorType for Rx<Uart> {
|
||||||
type Error = RxError;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Uart> embedded_hal_nb::serial::ErrorType for Rx<Uart> {
|
impl<Uart> embedded_hal_nb::serial::ErrorType for Rx<Uart> {
|
||||||
type Error = RxError;
|
type Error = Infallible;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Uart: Instance> embedded_hal_nb::serial::Read<u8> for Rx<Uart> {
|
impl<Uart: Instance> embedded_hal_nb::serial::Read<u8> for Rx<Uart> {
|
||||||
fn read(&mut self) -> nb::Result<u8, Self::Error> {
|
fn read(&mut self) -> nb::Result<u8, Self::Error> {
|
||||||
let uart = unsafe { &(*Uart::ptr()) };
|
|
||||||
let status_reader = uart.rxstatus().read();
|
|
||||||
let err = if status_reader.rxovr().bit_is_set() {
|
|
||||||
Some(RxError::Overrun)
|
|
||||||
} else if status_reader.rxfrm().bit_is_set() {
|
|
||||||
Some(RxError::Framing)
|
|
||||||
} else if status_reader.rxpar().bit_is_set() {
|
|
||||||
Some(RxError::Parity)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
if let Some(err) = err {
|
|
||||||
// The status code is always related to the next bit for the framing
|
|
||||||
// and parity status bits. We have to read the DATA register
|
|
||||||
// so that the next status reflects the next DATA word
|
|
||||||
// For overrun error, we read as well to clear the peripheral
|
|
||||||
self.read_fifo_unchecked();
|
|
||||||
return Err(err.into());
|
|
||||||
}
|
|
||||||
self.read_fifo().map(|val| (val & 0xff) as u8).map_err(|e| {
|
self.read_fifo().map(|val| (val & 0xff) as u8).map_err(|e| {
|
||||||
if let nb::Error::Other(_) = e {
|
if let nb::Error::Other(_) = e {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
@ -916,13 +871,23 @@ impl<Uart: Instance> embedded_io::Read for Rx<Uart> {
|
|||||||
if buf.is_empty() {
|
if buf.is_empty() {
|
||||||
return Ok(0);
|
return Ok(0);
|
||||||
}
|
}
|
||||||
|
let mut read = 0;
|
||||||
|
loop {
|
||||||
|
if self.0.rxstatus().read().rdavl().bit_is_set() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
for byte in buf.iter_mut() {
|
for byte in buf.iter_mut() {
|
||||||
let w = nb::block!(<Self as embedded_hal_nb::serial::Read<u8>>::read(self))?;
|
match <Self as embedded_hal_nb::serial::Read<u8>>::read(self) {
|
||||||
*byte = w;
|
Ok(w) => {
|
||||||
|
*byte = w;
|
||||||
|
read += 1;
|
||||||
|
}
|
||||||
|
Err(nb::Error::WouldBlock) => break,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(buf.len())
|
Ok(read)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1081,14 +1046,19 @@ impl<Uart: Instance> embedded_io::Write for Tx<Uart> {
|
|||||||
if buf.is_empty() {
|
if buf.is_empty() {
|
||||||
return Ok(0);
|
return Ok(0);
|
||||||
}
|
}
|
||||||
|
loop {
|
||||||
for byte in buf.iter() {
|
if self.0.txstatus().read().wrrdy().bit_is_set() {
|
||||||
nb::block!(<Self as embedded_hal_nb::serial::Write<u8>>::write(
|
break;
|
||||||
self, *byte
|
}
|
||||||
))?;
|
|
||||||
}
|
}
|
||||||
|
let mut written = 0;
|
||||||
Ok(buf.len())
|
for byte in buf.iter() {
|
||||||
|
match <Self as embedded_hal_nb::serial::Write<u8>>::write(self, *byte) {
|
||||||
|
Ok(_) => written += 1,
|
||||||
|
Err(nb::Error::WouldBlock) => return Ok(written),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(written)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&mut self) -> Result<(), Self::Error> {
|
fn flush(&mut self) -> Result<(), Self::Error> {
|
||||||
@ -1182,7 +1152,7 @@ impl<Uart: Instance> RxWithInterrupt<Uart> {
|
|||||||
/// This function will not disable the RX interrupts, so you don't need to call any other
|
/// This function will not disable the RX interrupts, so you don't need to call any other
|
||||||
/// API after calling this function to continue emptying the FIFO. RX errors are handled
|
/// API after calling this function to continue emptying the FIFO. RX errors are handled
|
||||||
/// as partial errors and are returned as part of the [IrqResult].
|
/// as partial errors and are returned as part of the [IrqResult].
|
||||||
pub fn irq_handler(&mut self, buf: &mut [u8; 16]) -> IrqResult {
|
pub fn on_interrupt(&mut self, buf: &mut [u8; 16]) -> IrqResult {
|
||||||
let mut result = IrqResult::default();
|
let mut result = IrqResult::default();
|
||||||
|
|
||||||
let irq_end = self.uart().irq_end().read();
|
let irq_end = self.uart().irq_end().read();
|
||||||
@ -1203,15 +1173,10 @@ impl<Uart: Instance> RxWithInterrupt<Uart> {
|
|||||||
|
|
||||||
// Timeout, empty the FIFO completely.
|
// Timeout, empty the FIFO completely.
|
||||||
if irq_end.irq_rx_to().bit_is_set() {
|
if irq_end.irq_rx_to().bit_is_set() {
|
||||||
loop {
|
// While there is data in the FIFO, write it into the reception buffer
|
||||||
// While there is data in the FIFO, write it into the reception buffer
|
while let Ok(byte) = self.0.read_fifo() {
|
||||||
let read_result = self.0.read();
|
buf[result.bytes_read] = byte as u8;
|
||||||
if let Some(byte) = self.read_handler(&mut result.errors, &read_result) {
|
result.bytes_read += 1;
|
||||||
buf[result.bytes_read] = byte;
|
|
||||||
result.bytes_read += 1;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1239,7 +1204,7 @@ impl<Uart: Instance> RxWithInterrupt<Uart> {
|
|||||||
/// If passed buffer is equal to or larger than the specified maximum length, an
|
/// If passed buffer is equal to or larger than the specified maximum length, an
|
||||||
/// [BufferTooShortError] will be returned. Other RX errors are treated as partial errors
|
/// [BufferTooShortError] will be returned. Other RX errors are treated as partial errors
|
||||||
/// and returned inside the [IrqResultMaxSizeOrTimeout] structure.
|
/// and returned inside the [IrqResultMaxSizeOrTimeout] structure.
|
||||||
pub fn irq_handler_max_size_or_timeout_based(
|
pub fn on_interrupt_max_size_or_timeout_based(
|
||||||
&mut self,
|
&mut self,
|
||||||
context: &mut IrqContextTimeoutOrMaxSize,
|
context: &mut IrqContextTimeoutOrMaxSize,
|
||||||
buf: &mut [u8],
|
buf: &mut [u8],
|
||||||
@ -1288,12 +1253,13 @@ impl<Uart: Instance> RxWithInterrupt<Uart> {
|
|||||||
if context.rx_idx == context.max_len {
|
if context.rx_idx == context.max_len {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let read_result = self.0.read();
|
// While there is data in the FIFO, write it into the reception buffer
|
||||||
if let Some(byte) = self.read_handler(&mut result.errors, &read_result) {
|
match self.0.read() {
|
||||||
buf[context.rx_idx] = byte;
|
Ok(byte) => {
|
||||||
context.rx_idx += 1;
|
buf[result.bytes_read] = byte;
|
||||||
} else {
|
result.bytes_read += 1;
|
||||||
break;
|
}
|
||||||
|
Err(_) => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.irq_completion_handler_max_size_timeout(&mut result, context);
|
self.irq_completion_handler_max_size_timeout(&mut result, context);
|
||||||
@ -1312,29 +1278,6 @@ impl<Uart: Instance> RxWithInterrupt<Uart> {
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_handler(
|
|
||||||
&self,
|
|
||||||
errors: &mut Option<UartErrors>,
|
|
||||||
read_res: &nb::Result<u8, RxError>,
|
|
||||||
) -> Option<u8> {
|
|
||||||
match read_res {
|
|
||||||
Ok(byte) => Some(*byte),
|
|
||||||
Err(nb::Error::WouldBlock) => None,
|
|
||||||
Err(nb::Error::Other(e)) => {
|
|
||||||
// Ensure `errors` is Some(IrqUartError), initializing if it's None
|
|
||||||
let err = errors.get_or_insert(UartErrors::default());
|
|
||||||
|
|
||||||
// Now we can safely modify fields inside `err`
|
|
||||||
match e {
|
|
||||||
RxError::Overrun => err.overflow = true,
|
|
||||||
RxError::Framing => err.framing = true,
|
|
||||||
RxError::Parity => err.parity = true,
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn check_for_errors(&self, errors: &mut Option<UartErrors>) {
|
fn check_for_errors(&self, errors: &mut Option<UartErrors>) {
|
||||||
let rx_status = self.uart().rxstatus().read();
|
let rx_status = self.uart().rxstatus().read();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ use va416xx::uart0 as uart_base;
|
|||||||
|
|
||||||
use crate::enable_nvic_interrupt;
|
use crate::enable_nvic_interrupt;
|
||||||
|
|
||||||
use super::{Bank, Instance, Rx, RxError, UartErrors};
|
use super::{Bank, Instance, Rx, UartErrors};
|
||||||
|
|
||||||
static UART_RX_WAKERS: [AtomicWaker; 3] = [const { AtomicWaker::new() }; 3];
|
static UART_RX_WAKERS: [AtomicWaker; 3] = [const { AtomicWaker::new() }; 3];
|
||||||
static RX_READ_ACTIVE: [AtomicBool; 3] = [const { AtomicBool::new(false) }; 3];
|
static RX_READ_ACTIVE: [AtomicBool; 3] = [const { AtomicBool::new(false) }; 3];
|
||||||
@ -48,7 +48,7 @@ impl RxFuture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Future for RxFuture {
|
impl Future for RxFuture {
|
||||||
type Output = Result<(), RxError>;
|
type Output = Result<(), Infallible>;
|
||||||
|
|
||||||
fn poll(
|
fn poll(
|
||||||
self: core::pin::Pin<&mut Self>,
|
self: core::pin::Pin<&mut Self>,
|
||||||
|
@ -8,6 +8,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v0.1.2] 2025-03-07
|
||||||
|
|
||||||
|
- Bump allowed HAL version to v0.5
|
||||||
|
|
||||||
|
# [v0.1.1] 2025-02-18
|
||||||
|
|
||||||
|
- Bump allowed HAL version to v0.4
|
||||||
|
|
||||||
# [v0.1.0] 2024-10-01
|
# [v0.1.0] 2024-10-01
|
||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
|
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/vorago-peb1-v0.1.2...HEAD
|
||||||
|
[v0.1.2]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/vorago-peb1-v0.1.1...vorago-peb1-v0.1.2
|
||||||
|
[v0.1.1]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/compare/vorago-peb1-v0.1.0...vorago-peb1-v0.1.1
|
||||||
|
[v0.1.0]: https://egit.irs.uni-stuttgart.de/rust/va416xx-rs/src/tag/vorago-peb1-v0.1.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vorago-peb1"
|
name = "vorago-peb1"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Board Support Crate for the Vorago PEB1 development board"
|
description = "Board Support Crate for the Vorago PEB1 development board"
|
||||||
@ -14,15 +14,9 @@ categories = ["embedded", "no-std", "hardware-support"]
|
|||||||
cortex-m = "0.7"
|
cortex-m = "0.7"
|
||||||
cortex-m-rt = "0.7"
|
cortex-m-rt = "0.7"
|
||||||
embedded-hal = "1"
|
embedded-hal = "1"
|
||||||
|
lis2dh12 = { version = "0.7", features = ["out_f32"] }
|
||||||
|
|
||||||
[dependencies.va416xx-hal]
|
va416xx-hal = { version = ">=0.3, <=0.5", features = ["va41630"] }
|
||||||
path = "../va416xx-hal"
|
|
||||||
features = ["va41630"]
|
|
||||||
version = ">=0.3, <=0.4"
|
|
||||||
|
|
||||||
[dependencies.lis2dh12]
|
|
||||||
version = "0.7"
|
|
||||||
features = ["out_f32"]
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
rt = ["va416xx-hal/rt"]
|
rt = ["va416xx-hal/rt"]
|
||||||
|
Reference in New Issue
Block a user