so like, there!s errrors but idc and its late and im eepi

This commit is contained in:
benstrb 2026-04-06 00:33:46 +02:00
parent f7a83875aa
commit 242f218a62
15 changed files with 2920 additions and 2 deletions

View file

@ -1,3 +1,49 @@
fn main() {
println!("Hello, world!");
#![no_std]
#![no_main]
use cortex_m_rt::entry;
use defmt_rtt as _;
use hal::prelude::*;
use panic_probe as _;
use stm32f4xx_hal as hal;
defmt::timestamp!("{=u32}", 0u32);
#[entry]
fn main() -> ! {
let peripherals = hal::pac::Peripherals::take().unwrap();
let mut rcc = peripherals.RCC.constrain();
let ltdc = peripherals.LTDC;
let dma2d = peripherals.DMA2D;
let display_config = hal::ltdc::DisplayConfig {
active_width: 480,
active_height: 800,
h_back_porch: 8,
h_front_porch: 8,
v_back_porch: 1,
v_front_porch: 1,
h_sync: 15,
v_sync: 60,
frame_rate: 5,
h_sync_pol: false,
v_sync_pol: false,
no_data_enable_pol: false,
pixel_clock_pol: false,
};
let display = hal::ltdc::DisplayController::new(
ltdc,
dma2d,
None,
hal::ltdc::PixelFormat::AL88,
display_config,
None,
);
let gpiog = peripherals.GPIOG.split(&mut rcc);
let mut led1 = gpiog.pg6.into_push_pull_output();
led1.set_high();
loop {}
}