| Crates.io | arduino-uno-r4-hal |
| lib.rs | arduino-uno-r4-hal |
| version | 0.1.0 |
| created_at | 2025-08-19 11:20:27.561825+00 |
| updated_at | 2025-08-19 11:20:27.561825+00 |
| description | Hardware Abstraction Layer for Arduino Uno R4 (RA4M1) |
| homepage | |
| repository | https://github.com/kanade-k-1228/arduino-uno-r4-hal |
| max_upload_size | |
| id | 1801724 |
| size | 24,462 |
Hardware Abstraction Layer (HAL) for Arduino Uno R4 (RA4M1) microcontroller, implementing the embedded-hal traits.
Add this to your Cargo.toml:
[dependencies]
arduino-uno-r4-hal = "0.1.0"
#![no_std]
#![no_main]
use arduino_uno_r4_hal::gpio::{Pin, Output};
use arduino_uno_r4_hal::delay::Delay;
use embedded_hal::delay::DelayNs;
use panic_halt as _;
#[cortex_m_rt::entry]
fn main() -> ! {
let mut led = Pin::<'1', 11, Output>::new();
let mut delay = Delay::new();
loop {
led.set_high();
delay.delay_ms(500);
led.set_low();
delay.delay_ms(500);
}
}
#![no_std]
#![no_main]
use arduino_uno_r4_hal::gpio::{Pin, InputPullUp, Output};
use panic_halt as _;
#[cortex_m_rt::entry]
fn main() -> ! {
let button = Pin::<'0', 2, InputPullUp>::new();
let mut led = Pin::<'1', 11, Output>::new();
loop {
if button.is_low() {
led.set_high();
} else {
led.set_low();
}
}
}
cargo build --examples
MIT OR Apache-2.0