Skip to content

Commit 1becd88

Browse files
Jonathan Pallant (42 Technology)hannobraun
authored andcommitted
Add Icarus board support.
1 parent 56ea2dd commit 1becd88

File tree

6 files changed

+718
-0
lines changed

6 files changed

+718
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ members = [
55
"boards/nRF52-DK",
66
"boards/nRF52840-DK",
77
"boards/nRF9160-DK",
8+
"boards/actinius-icarus",
89
"nrf52810-hal",
910
"nrf52832-hal",
1011
"nrf52840-hal",

boards/actinius-icarus/Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
authors = [
3+
"Ruben Paz <[email protected]>",
4+
"Jonathan Pallant <[email protected]>",
5+
]
6+
categories = ["embedded", "no-std"]
7+
description = "BSP for the Actinius Icarus"
8+
keywords = ["arm", "nrf9160"]
9+
license = "MIT OR Apache-2.0"
10+
readme = "README.md"
11+
name = "actinius-icarus-bsp"
12+
version = "0.1.0"
13+
edition = "2018"
14+
15+
[dependencies]
16+
cortex-m = "0.6.0"
17+
cortex-m-rt = "0.6.7"
18+
panic-halt = "0.2.0"
19+
nrf9160-hal = { version = "0.1.0", path = "../../nrf9160-hal" }
20+
21+
[dev-dependencies]
22+
nb = "0.1.1"
23+
panic-semihosting = "0.5.1"

boards/actinius-icarus/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `actinius-icarus-bsp`
2+
3+
Board support crate for the Actinius Icarus -
4+
https://www.actinius.com/get-started.
5+
6+
7+
This crate is in early development.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#![no_std]
2+
#![no_main]
3+
4+
extern crate cortex_m_rt as rt;
5+
extern crate nb;
6+
extern crate actinius_icarus_bsp as bsp;
7+
extern crate panic_semihosting;
8+
9+
use core::fmt::Write;
10+
use bsp::{hal::Timer, prelude::*, Board};
11+
use nb::block;
12+
use rt::entry;
13+
14+
#[entry]
15+
fn main() -> ! {
16+
let mut board = Board::take().unwrap();
17+
let mut timer = Timer::new(board.TIMER0_NS);
18+
19+
writeln!(board.cdc_uart, "Hello, world!").unwrap();
20+
21+
let mut led_is_on = false;
22+
loop {
23+
if led_is_on {
24+
board.leds.led_red.disable();
25+
} else {
26+
board.leds.led_red.enable();
27+
}
28+
timer.start(1_000_000_u32);
29+
block!(timer.wait()).unwrap();
30+
led_is_on = !led_is_on;
31+
}
32+
}

0 commit comments

Comments
 (0)