Compare commits
No commits in common. "e6eea599b4f3d5adcc3d710cb5c920c40a5846dc" and "5b2648440fd2fdf08e25e9a5912f15bd4d8e400a" have entirely different histories.
e6eea599b4
...
5b2648440f
|
@ -4,8 +4,7 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
arduino-hal = { git = "https://github.com/rahix/avr-hal", features = ["arduino-uno"] }
|
ruduino = { git = "https://github.com/avr-rust/ruduino", branch = "master" }
|
||||||
panic-halt = "0.2.0"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
19
src/main.rs
19
src/main.rs
|
@ -1,19 +1,18 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
use arduino_hal::delay_ms;
|
use ruduino::cores::current::port::B5 as led;
|
||||||
use panic_halt as _;
|
use ruduino::delay::delay_ms;
|
||||||
|
use ruduino::Pin;
|
||||||
|
|
||||||
#[arduino_hal::entry]
|
#[no_mangle]
|
||||||
fn main() -> ! {
|
pub extern "C" fn main() -> ! {
|
||||||
let peripherals = arduino_hal::Peripherals::take().unwrap();
|
led::set_output();
|
||||||
let pins = arduino_hal::pins!(peripherals);
|
|
||||||
|
|
||||||
let mut led = pins.d13.into_output();
|
|
||||||
led.set_high();
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
led.toggle();
|
led::set_high();
|
||||||
|
delay_ms(1000);
|
||||||
|
led::set_low();
|
||||||
delay_ms(1000);
|
delay_ms(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue