Skip to content

Commit

Permalink
drv/lpc55-gpio: convert to task_slot!
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-shift committed Oct 19, 2021
1 parent 6d23606 commit e4bc27f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drv/lpc55-gpio/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use drv_lpc55_syscon_api::*;
use hl;
use userlib::{FromPrimitive, *};

declare_task!(SYSCON, syscon_driver);
task_slot!(SYSCON, syscon_driver);

#[repr(u32)]
enum ResponseCode {
Expand Down Expand Up @@ -181,7 +181,7 @@ fn gpio_port_pin_validate(pin: u32) -> Result<(usize, usize), ResponseCode> {
}

fn turn_on_gpio_clocks() {
let syscon = Syscon::from(get_task_id(SYSCON));
let syscon = Syscon::from(SYSCON.get_task_id());

syscon.enable_clock(Peripheral::Iocon);
syscon.leave_reset(Peripheral::Iocon);
Expand Down
3 changes: 3 additions & 0 deletions gemini-bu-rot/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ requires = {flash = 16384, ram = 1024}
uses = ["gpio", "iocon"]
start = true

[tasks.gpio_driver.task-slots]
syscon_driver = "syscon_driver"

[tasks.user_leds]
path = "../drv/user-leds"
name = "drv-user-leds"
Expand Down
3 changes: 3 additions & 0 deletions gimlet-rot/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ requires = {flash = 16384, ram = 1024}
uses = ["gpio", "iocon"]
start = true

[tasks.gpio_driver.task-slots]
syscon_driver = "syscon_driver"

[tasks.usart_driver]
path = "../drv/lpc55-usart"
name = "drv-lpc55-usart"
Expand Down
3 changes: 3 additions & 0 deletions lpc55/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ uses = ["gpio", "iocon"]
start = true
stacksize = 1000

[tasks.gpio_driver.task-slots]
syscon_driver = "syscon_driver"

[tasks.user_leds]
path = "../drv/user-leds"
name = "drv-user-leds"
Expand Down

0 comments on commit e4bc27f

Please sign in to comment.