//! Board-level entry point for {{ ir.board.name }}.
//!
//! Generated by rlvgl-creator BSP generator.
//! Chip: {{ ir.chip.name }} ({{ ir.chip.cores }}-core {{ ir.chip.arch }})
{%- if ir.board.flash_mb %}
//! Flash: {{ ir.board.flash_mb }} MB
{%- endif %}

#![allow(unused)]

use super::{clocks, gpio, peripherals};

/// Board-level initialization.
///
/// Calls clock, GPIO, and peripheral init in the correct order.
pub unsafe fn init() {
    clocks::init_clocks();
    gpio::init_pins();
    peripherals::init_peripherals();
}
{%- if ir.board.console %}

/// Console configuration.
pub const CONSOLE_PERIPHERAL: &str = "{{ ir.board.console.peripheral }}";
pub const CONSOLE_BAUD: u32 = {{ ir.board.console.baud }};
{%- endif %}
{%- for key in ir.board.features | list %}

/// Board feature: {{ key }}
pub const FEATURE_{{ key | upper }}: &str = "{{ ir.board.features[key] }}";
{%- endfor %}
