Skip to content

Commit

Permalink
Remove need for avr-device
Browse files Browse the repository at this point in the history
  • Loading branch information
kpcyrd committed Jan 7, 2024
1 parent e8adc66 commit c5bdf27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
13 changes: 0 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ opt-level = "s"

[dependencies]
attiny-hal = { git = "https://github.com/rahix/avr-hal", features = ["attiny85"] }
avr-device = { version = "0.5.3", features = ["attiny85", "rt"] }
embedded-hal = "0.2.7"
panic-halt = "0.2.0"
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#![no_std]
#![no_main]

use attiny_hal::clock;
use attiny_hal::delay::Delay;
use attiny_hal::prelude::_embedded_hal_blocking_delay_DelayMs;
use avr_device::attiny85::Peripherals;
use attiny_hal::{clock, delay::Delay, Peripherals, Pins};
use embedded_hal::blocking::delay::DelayMs;
use panic_halt as _;

#[avr_device::entry]
#[no_mangle]
fn main() -> ! {
let pac = Peripherals::take().unwrap();
let pins = attiny_hal::Pins::new(pac.PORTB);
let pins = Pins::new(pac.PORTB);

let mut delay = Delay::<clock::MHz8>::new();

Expand Down

0 comments on commit c5bdf27

Please sign in to comment.