Monorepo for Rust support of VA416XX family of radiation hardened MCUs
This commit is contained in:
11
examples/simple/src/lib.rs
Normal file
11
examples/simple/src/lib.rs
Normal file
@ -0,0 +1,11 @@
|
||||
#![no_std]
|
||||
|
||||
/// PEB1 board specific configuration.
|
||||
pub mod peb1 {
|
||||
use va416xx_hal::time::Hertz;
|
||||
|
||||
// The clock on the PEB1 board has a 20 MHz clock which is increased to 40 MHz with a configurable
|
||||
// PLL by default.
|
||||
pub const EXTCLK_FREQ: Hertz = Hertz::from_raw(40_000_000);
|
||||
pub const XTAL_FREQ: Hertz = Hertz::from_raw(10_000_000);
|
||||
}
|
13
examples/simple/src/main.rs
Normal file
13
examples/simple/src/main.rs
Normal file
@ -0,0 +1,13 @@
|
||||
//! Dummy app which does not do anything.
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
use cortex_m_rt::entry;
|
||||
use panic_rtt_target as _;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
loop {
|
||||
cortex_m::asm::nop();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user