alarmo 0.0.5

Provides a convenient API to bootstrap firmware and access peripherals on the Nintendo Alarmo
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use embedded_alloc::LlffHeap as Heap;

#[global_allocator]
static HEAP: Heap = Heap::empty();

pub fn init_heap(size: usize) {
    let start_addr = cortex_m_rt::heap_start() as usize;
    let end_addr = start_addr.checked_add(size).expect("size too large") - 1;
    assert!(
        end_addr < 0x70_00_00_00 + 0x02_00_00_00,
        "end address out of OCTOSPI2"
    );
    unsafe { HEAP.init(start_addr, size) }
}