Skip to main content

Crate blackbox_rs

Crate blackbox_rs 

Source
Expand description

Board support crate for the Blackbox board (STM32H743XI, rev.Y).

init brings the whole board up at its design clocks and returns a Board holding ready-to-use drivers. Each subsystem also stands alone in its own module if you want to wire a custom subset.

#[embassy_executor::main]
async fn main(_spawner: Spawner) -> ! {
    let mut board = blackbox_rs::init().await;
    loop {
        let touch = board.touch.poll(&mut board.i2c);
        board.display.target().clear(Rgb565::BLACK).ok();
        board.display.swap().await;
    }
}

Modules§

audio
Stock Blackbox audio bring-up: SAI1_A + SAI1_B + SAI2_A, raw registers.
buttons
13 active-low buttons with board pull-ups (README §buttons).
clock
Board clock tree (README §RCC).
cpu
CPU caches, MPU regions and SYSCFG fixes that must run before the peripherals.
display
LTDC display: 320×240 RGB565 panel, vblank-synced double buffer, plus panel power and backlight. Framebuffers live in SDRAM (coherent with the LTDC DMA — D-cache is off).
knobs
4 endless rotary encoders, read through ADC1 (README §knobs).
leds
11 active-high indicator LEDs (README §LEDs).
sdram
External SDRAM: 2× ISSI IS42S16160J (32-bit bus) on FMC bank1, 64 MiB @ 0xC000_0000.
touch
Goodix GT9147 capacitive touch over I2C1 (README §touch).

Structs§

Board
The fully initialized board. Touch owns its handle to the shared I2C1 bus.
Irqs

Functions§

init
Bring up clocks, CPU/MPU, SDRAM and every on-board peripheral, then start a 440 Hz tone.