import cleanup (cargo fix)
This commit is contained in:
parent
b42e73480a
commit
81443942ba
2 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
use core::{cell::{Cell, OnceCell}, sync::atomic::AtomicU8};
|
||||
|
||||
use arduino_hal::{hal::port::{PD1, PD2, PD3, PD4}, pac::{exint::eicra::{ISC0_A, ISC1_A}, EXINT}, port::{mode::{Floating, Input}, Pin}};
|
||||
use arduino_hal::{hal::port::{PD3, PD4}, pac::{EXINT}, port::{mode::{Floating, Input}, Pin}};
|
||||
use avr_device::interrupt::{self, CriticalSection, Mutex};
|
||||
pub fn setup_encoder(d3: Pin<Input<Floating>, PD3>, d4: Pin<Input<Floating>, PD4>, int: EXINT) {
|
||||
interrupt::free(|cs| {
|
||||
|
|
|
@ -2,17 +2,15 @@
|
|||
#![no_main]
|
||||
#![feature(abi_avr_interrupt, cell_update)]
|
||||
|
||||
use core::sync::atomic::Ordering;
|
||||
|
||||
use arduino_hal::{default_serial, delay_ms, hal::port::{PD4, PD5}, pac::tc1::OCR1A, port::{mode::{Input, PullUp}, Pin}};
|
||||
use arduino_hal::{hal::port::PD5, pac::tc1::OCR1A, port::{mode::{Input, PullUp}, Pin}};
|
||||
use avr_device::interrupt;
|
||||
use encoder::{rotations, setup_encoder, update_encoder, COUNTS, TICKS_PER_ROT};
|
||||
use encoder::{rotations, setup_encoder, COUNTS};
|
||||
use panic_halt as _;
|
||||
mod servo;
|
||||
use servo::{configure_timer_one, Servo};
|
||||
use ufmt::uwriteln;
|
||||
|
||||
use crate::servo::calculate_duty;
|
||||
mod encoder;
|
||||
|
||||
// d3: encoder
|
||||
|
|
Loading…
Reference in a new issue