Fix for nano v3
This commit is contained in:
parent
510e834de0
commit
91b336f2fd
3 changed files with 12 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
||||||
[build]
|
[build]
|
||||||
target = "avr-atmega328p.json"
|
target = "avr-atmega328p.json"
|
||||||
|
|
||||||
|
# nano v3, not an official arduino
|
||||||
[target.'cfg(target_arch = "avr")']
|
[target.'cfg(target_arch = "avr")']
|
||||||
runner = "ravedude uno -cb 57600"
|
runner = "ravedude nano -cb 57600 -P /dev/ttyUSB0"
|
||||||
|
|
||||||
[unstable]
|
[unstable]
|
||||||
build-std = ["core"]
|
build-std = ["core"]
|
|
@ -31,10 +31,18 @@ fn panic(_info: &PanicInfo) -> ! {
|
||||||
|
|
||||||
#[arduino_hal::entry]
|
#[arduino_hal::entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
let setup = Setup::default();
|
let mut setup = Setup::default();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
fuzz(&setup);
|
fuzz(&setup);
|
||||||
|
|
||||||
|
if setup.led.is_set_high() {
|
||||||
|
setup.led.set_low();
|
||||||
|
} else {
|
||||||
|
setup.led.set_high();
|
||||||
|
}
|
||||||
|
|
||||||
|
delay_ms(250);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
use core::mem;
|
use core::mem;
|
||||||
|
|
||||||
use arduino_hal::{
|
use arduino_hal::{
|
||||||
hal::{
|
hal::port::{PB4, PB5, PC4, PC5, PD2},
|
||||||
adc,
|
|
||||||
port::{PB4, PB5, PC4, PC5, PD2},
|
|
||||||
},
|
|
||||||
pac::{
|
pac::{
|
||||||
adc::adc::ADC_SPEC,
|
adc::adc::ADC_SPEC,
|
||||||
tc1::{ocr1a::OCR1A_SPEC, ocr1b::OCR1B_SPEC},
|
tc1::{ocr1a::OCR1A_SPEC, ocr1b::OCR1B_SPEC},
|
||||||
|
|
Loading…
Reference in a new issue