Fix for nano v3

This commit is contained in:
hodasemi 2022-07-21 13:13:19 +02:00
parent 510e834de0
commit 91b336f2fd
3 changed files with 12 additions and 6 deletions

View file

@ -1,8 +1,9 @@
[build]
target = "avr-atmega328p.json"
# nano v3, not an official arduino
[target.'cfg(target_arch = "avr")']
runner = "ravedude uno -cb 57600"
runner = "ravedude nano -cb 57600 -P /dev/ttyUSB0"
[unstable]
build-std = ["core"]

View file

@ -31,10 +31,18 @@ fn panic(_info: &PanicInfo) -> ! {
#[arduino_hal::entry]
fn main() -> ! {
let setup = Setup::default();
let mut setup = Setup::default();
loop {
fuzz(&setup);
if setup.led.is_set_high() {
setup.led.set_low();
} else {
setup.led.set_high();
}
delay_ms(250);
}
}

View file

@ -1,10 +1,7 @@
use core::mem;
use arduino_hal::{
hal::{
adc,
port::{PB4, PB5, PC4, PC5, PD2},
},
hal::port::{PB4, PB5, PC4, PC5, PD2},
pac::{
adc::adc::ADC_SPEC,
tc1::{ocr1a::OCR1A_SPEC, ocr1b::OCR1B_SPEC},