Crates.io | trellis_m4 |
lib.rs | trellis_m4 |
version | 0.10.1 |
source | src |
created_at | 2019-03-04 04:44:28.396622 |
updated_at | 2024-10-18 20:26:56.209598 |
description | Board Support crate for the Adafruit NeoTrellis M4 Express |
homepage | |
repository | https://github.com/atsamd-rs/atsamd |
max_upload_size | |
id | 118571 |
size | 41,801 |
This crate provides a type-safe Rust API for working with the Adafruit NeoTrellis M4 board.
rustup target add thumbv7em-none-eabihf
Check out the repository for examples:
https://github.com/atsamd-rs/atsamd/tree/master/boards/trellis_m4/examples
cd boards/trellis_m4
$ cargo hf2 --release --example neopixel_rainbow
Finished release [optimized + debuginfo] target(s) in 0.19s
Searching for a connected device with known vid/pid pair.
Trying Ok(Some("Adafruit Industries")) Ok(Some("PyBadge"))
Flashing "/Users/User/atsamd/boards/trellis_m4/target/thumbv7em-none-eabihf/release/examples/neopixel_rainbow"
Finished in 0.079s
$
trellis_m4
Cargo FeaturesThe following optional hardware drivers can be enabled as cargo features:
adxl343
: ADXL343 accelerometer supportkeypad-unproven
: (alpha) support for button input via the keypad crateTo enable them, use the features
option when adding a crate dependency to
your Cargo.toml:
[dependencies]
trellis_m4 = { version = "~0.1", features = ["adxl343", "keypad-unproven"] }
Or when running an example:
$ cargo hf2 --release --example neopixel_keypad
error: target `neopixel_keypad` in package `trellis_m4` requires the features: `keypad-unproven`
Consider enabling them by passing, e.g., `--features="keypad-unproven"`
Just follow the instructions to add --features like
cargo hf2 --release --example neopixel_keypad --features="keypad-unproven"
Finished release [optimized + debuginfo] target(s) in 0.09s
Searching for a connected device with known vid/pid pair.
Trying Ok(Some("Adafruit Industries")) Ok(Some("PyGamer"))
Flashing "/Users/User/atsamd/boards/trellis_m4/target/thumbv7em-none-eabihf/release/examples/neopixel_keypad"
Finished in 0.167s
$