Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ members = [
"boards/*",
]

[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
rust-version = "1.77.2"

[workspace.lints.rust]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for adding these empty lints sections?

# TODO: add any workspace-wide rust lint configurations
# TODO: enable to make identifier usage consistent per file
# unused_qualifications = "warn"

[workspace.lints.clippy]
# TODO: add any workspace-wide clippy lint configurations

[profile.dev]
debug = true
opt-level = 0
Expand All @@ -22,7 +36,6 @@ inherits = "dev"
opt-level = 2
lto = "thin"


[profile.release]
lto = true
opt-level = "s"
Expand Down
11 changes: 7 additions & 4 deletions atsamd-hal-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[package]
authors = ["Tethys Svensson"]
name = "atsamd-hal-macros"
rust-version = "1.77.2"
version = "0.2.5"
edition = "2021"
license = "MIT OR Apache-2.0"
categories = ["embedded", "hardware-support", "no-std"]
description = "Procedural macros for the atsamd-hal library"
documentation = "https://docs.rs/crate/atsamd-hal-macros/"
repository = "https://github.com/atsamd-rs/atsamd"
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

[lints]
workspace = true

[lib]
proc-macro = true
Expand Down
15 changes: 7 additions & 8 deletions atsamd-hal-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!
//! The main purpose of this crate is to separate the task of writing the code
//! to support peripherals of the atsamd families from the task of figuring out
//! which specific devices has those peripherals.
//! which specific devices have those peripherals.
//!
//! The actual mapping of devices to peripherals is specified in the
//! `devices.yaml` file. In the `atsamd-hal` crate you then only need to care
Expand Down Expand Up @@ -40,8 +40,8 @@ use parsing::{eat_attribute, eat_eof, eat_group, eat_hal_expr, eat_operator, eat
/// It can be used like `#[hal_cfg([peripheral expression])]`.
///
/// The macro will look up all devices that fulfill the expression and expand
/// the macro into a cfg attribute of the form `#[cfg(any(feature = "device1",
/// feature = "device2", ...)]`.
/// the macro into a cfg attribute of the form
/// `#[cfg(any(feature = "device1", feature = "device2", ...)]`.
#[proc_macro_attribute]
pub fn hal_cfg(args: TokenStream, input: TokenStream) -> TokenStream {
hal_cfg_impl(args).map_or_else(
Expand All @@ -61,8 +61,7 @@ fn hal_cfg_impl(args: TokenStream) -> Result<Group, Error> {
Ok(cfgs)
}

/// Macro which expands to a `mod foo;` item with different paths for each
/// device.
/// Macro, which expands to a `mod foo;` item with different paths for each device.
///
/// It can be used like this:
///
Expand Down Expand Up @@ -92,7 +91,7 @@ fn hal_cfg_impl(args: TokenStream) -> Result<Group, Error> {
/// ```
///
/// Ideally you would be to write `pub mod calibration;` instead of
/// `pub mod calibration {}`, but unfortunately non-inline modules are not
/// `pub mod calibration {}`, but unfortunately, non-inline modules are not
/// currently supposed in proc macros. See
/// [rust#54727](https://github.com/rust-lang/rust/issues/54727) for details.
#[proc_macro_attribute]
Expand Down Expand Up @@ -156,7 +155,7 @@ fn hal_module_impl(args: TokenStream, input: TokenStream) -> Result<TokenStream,

/// Helper macro to allow using `#[hal_cfg(..)]` macro in more places
///
/// Normally the `#[cfg(..)]` macro is allowed in many more places than
/// Normally, the `#[cfg(..)]` macro is allowed in many more places than
/// proc-macros, such as directly on a statement. This mitigates that
/// restriction.
///
Expand All @@ -170,7 +169,7 @@ fn hal_module_impl(args: TokenStream, input: TokenStream) -> Result<TokenStream,
/// }
/// ```
///
/// This works, because attributes are allowed on the outer item.
/// This works because attributes are allowed on the outer item.
///
/// The `#[hal_macro_helper]` will search through the item and replace all
/// instances of the `#[hal_cfg(..)]` attribute with the corresponding
Expand Down
10 changes: 6 additions & 4 deletions boards/arduino_mkr1000/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Eric Rushing <[email protected]>"]
description = "Board Support crate for the Arduino MKR 1000 WiFi"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a "tier 2" BSP, I don't think we want to use the wider workspace settings for it, that kinda defeats the purpose of the distinction from tier 1.

license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
10 changes: 6 additions & 4 deletions boards/arduino_mkrvidor4000/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Sameer Puri <[email protected]>"]
description = "Board Support crate for the Arduino MKR VIDOR 4000"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
10 changes: 6 additions & 4 deletions boards/arduino_mkrzero/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Wez Furlong <[email protected]>", "David McGillicuddy <contact@djmc
description = "Board Support crate for the Arduino MKRZERO"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
10 changes: 6 additions & 4 deletions boards/arduino_nano33iot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Gus Wynn <[email protected]>"]
description = "Board Support crate for the Arduino Nano 33 IOT"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal", "arduino"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
19 changes: 11 additions & 8 deletions boards/atsame54_xpro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
[package]
authors = [
"Karsten Große <[email protected]>",
"John Little <[email protected]>",
"Karsten Große <[email protected]>",
"John Little <[email protected]>",
]
categories = ["embedded", "hardware-support", "no-std"]
description = "Board Support crate for the SAM E54 Xplained Pro Evaluation Kit"
edition = "2021"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
license = "MIT OR Apache-2.0"
name = "atsame54_xpro"
readme = "README.md"
repository = "https://github.com/atsamd-rs/atsamd"
version = "0.12.0"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
optional = true
Expand All @@ -32,9 +35,9 @@ version = "0.3.1"

[dev-dependencies]
mcan = "0.2"
panic-rtt-target = {version = "0.1", features = ["cortex-m"]}
rtic = {version = "2.1.2", features = ["thumbv7-backend"]}
rtt-target = {version = "0.3", features = ["cortex-m"]}
panic-rtt-target = { version = "0.1", features = ["cortex-m"] }
rtic = { version = "2.1.2", features = ["thumbv7-backend"] }
rtt-target = { version = "0.3", features = ["cortex-m"] }

[features]
default = ["rt", "atsamd-hal/same54p"]
Expand Down
10 changes: 6 additions & 4 deletions boards/circuit_playground_express/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ version = "0.11.1"
authors = ["Paul Sajna <[email protected]>"]
description = "Board Support crate for the Adafruit Circuit Playground Express"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2018"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
10 changes: 6 additions & 4 deletions boards/edgebadge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ authors = ["Jacob Rosenthal <@jacobrosenthal>"]
description = "Board Support crate for the Adafruit EdgeBadge"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
exclude = ["assets"]
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
cortex-m = "0.7"
Expand Down
17 changes: 9 additions & 8 deletions boards/feather_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
authors = ["Ben Bergman <[email protected]>"]
categories = ["embedded", "hardware-support", "no-std"]
description = "Board Support crate for the Adafruit Feather M0"
edition = "2021"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
license = "MIT OR Apache-2.0"
name = "feather_m0"
readme = "README.md"
repository = "https://github.com/atsamd-rs/atsamd"
resolver = "2"
version = "0.19.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the repository link for BSPs shouldn't actually go to eg https://github.com/atsamd-rs/atsamd/tree/master/boards/metro_m0


[lints]
workspace = true

# for cargo flash
[package.metadata]
Expand Down Expand Up @@ -47,14 +48,14 @@ cortex-m-semihosting = "0.3"
defmt = "0.3"
defmt-rtt = "0.4"
drogue-nom-utils = "0.1"
embassy-executor = {version = "0.6.2", features = ["arch-cortex-m", "executor-thread", "task-arena-size-64"]}
embassy-executor = { version = "0.6.2", features = ["arch-cortex-m", "executor-thread", "task-arena-size-64"] }
embedded-graphics = "0.7.1"
heapless = "0.8"
nom = {version = "5", default-features = false}
nom = { version = "5", default-features = false }
panic-halt = "0.2"
panic-probe = "0.3"
panic-semihosting = "0.6"
rtic-monotonics = {version = "1.3.0", features = ["cortex-m-systick", "systick-10khz"]}
rtic-monotonics = { version = "1.3.0", features = ["cortex-m-systick", "systick-10khz"] }
ssd1306 = "0.7"
usbd-serial = "0.2"

Expand Down
12 changes: 7 additions & 5 deletions boards/feather_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ authors = ["Theodore DeRego <[email protected]>"]
categories = ["embedded", "hardware-support", "no-std"]
description = "Board Support crate for the Adafruit Feather M4"
documentation = "https://atsamd-rs.github.io/atsamd/atsamd51j/feather_m4/"
edition = "2021"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
license = "MIT OR Apache-2.0"
name = "feather_m4"
readme = "README.md"
repository = "https://github.com/atsamd-rs/atsamd"
version = "0.17.0"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

# for cargo flash
[package.metadata]
Expand Down Expand Up @@ -37,7 +39,7 @@ heapless = "0.7"
panic-halt = "0.2"
cortex-m-semihosting = "0.5.0"
panic-semihosting = "0.5"
rtic = {version = "2.1.1", features = ["thumbv7-backend"]}
rtic = { version = "2.1.1", features = ["thumbv7-backend"] }
smart-leds = "0.3"
usbd-serial = "0.2"
ws2812-timer-delay = "0.3"
Expand Down
10 changes: 6 additions & 4 deletions boards/gemma_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Wez Furlong <[email protected]>"]
description = "Board Support crate for the Adafruit Gemma M0"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
10 changes: 6 additions & 4 deletions boards/grand_central_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ authors = ["Dustin Little <[email protected]>"]
description = "Board Support crate for the Adafruit Grand Central M4 Express"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
edition = "2021"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
14 changes: 8 additions & 6 deletions boards/itsybitsy_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ authors = ["Ben Bergman <[email protected]>"]
description = "Board Support crate for the Adafruit ItsyBitsy M0"
keywords = ["no-std", "arm", "cortex-m", "embedded-hal"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/atsamd-rs/atsamd"
readme = "README.md"
edition = "2021"
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
bitbang-hal = "0.3"
apa102-spi = "0.3"
embedded-hal-02 = {package = "embedded-hal", version = "0.2", features = ["unproven"]}
embedded-hal-02 = { package = "embedded-hal", version = "0.2", features = ["unproven"] }
smart-leds = "0.3"

[dependencies.cortex-m-rt]
Expand All @@ -34,7 +36,7 @@ optional = true

[dev-dependencies]
cortex-m-rtic = "1.0"
cortex-m = {version = "0.7", features = ["critical-section-single-core"]}
cortex-m = { version = "0.7", features = ["critical-section-single-core"] }
usbd-serial = "0.2.2"
usbd-hid = "0.8.2"
cortex-m-semihosting = "0.3"
Expand Down
Loading
Loading