Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename leds to led
To match the Tock drivers rename the libtock-rs leds to led.

Signed-off-by: Alistair Francis <[email protected]>
  • Loading branch information
alistair23 committed May 13, 2021
commit bfb7b40ebaf8f50ad5bf5ccb1333d5b84544704d
2 changes: 1 addition & 1 deletion examples/blink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ libtock_core::stack_size! {0x400}
async fn main() -> TockResult<()> {
let mut drivers = libtock::retrieve_drivers()?;

let leds_driver = drivers.leds.init_driver()?;
let leds_driver = drivers.led.init_driver()?;
let mut timer_driver = drivers.alarm.create_timer_driver();
let timer_driver = timer_driver.activate()?;

Expand Down
6 changes: 3 additions & 3 deletions src/drivers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::gpio::GpioDriverFactory;
use crate::hmac::HmacDriverFactory;
use crate::i2c_master::I2cDriverFactory;
use crate::i2c_master_slave::I2cMSDriverFactory;
use crate::leds::LedsDriverFactory;
use crate::led::LedsDriverFactory;
use crate::result::OtherError;
use crate::result::TockError;
use crate::rng::RngDriver;
Expand All @@ -25,7 +25,7 @@ use core::cell::Cell;
pub struct Drivers {
pub console: ConsoleDriver,
pub ctap: CtapDriverFactory,
pub leds: LedsDriverFactory,
pub led: LedsDriverFactory,
pub alarm: DriverContext,
pub gpio: GpioDriverFactory,
pub hmac: HmacDriverFactory,
Expand Down Expand Up @@ -75,7 +75,7 @@ const DRIVERS: Drivers = Drivers {
buttons: ButtonsDriverFactory,
console: ConsoleDriver,
ctap: CtapDriverFactory,
leds: LedsDriverFactory,
led: LedsDriverFactory,
alarm: DriverContext {
active_timer: Cell::new(None),
},
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub mod gpio;
pub mod hmac;
pub mod i2c_master;
pub mod i2c_master_slave;
pub mod leds;
pub mod led;
pub mod result;
pub mod rng;
pub mod sensors;
Expand Down