prepare HAL patch and embassy release #62
@ -28,7 +28,7 @@ embassy-executor = { version = "0.7", features = [
|
|||||||
"executor-interrupt"
|
"executor-interrupt"
|
||||||
]}
|
]}
|
||||||
|
|
||||||
va416xx-hal = { version = "0.4", features = ["va41630"] }
|
va416xx-hal = { version = "0.4", path = "../../va416xx-hal" }
|
||||||
va416xx-embassy = { path = "../../va416xx-embassy", default-features = false }
|
va416xx-embassy = { path = "../../va416xx-embassy", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
@ -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" }
|
va416xx-hal = { version = "0.4", path = "../va416xx-hal" }
|
||||||
|
|
||||||
[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,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [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
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "va416xx-hal"
|
name = "va416xx-hal"
|
||||||
version = "0.4.0"
|
version = "0.4.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"
|
||||||
|
@ -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.
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user