use crate::dsi_cmd_mode;
const DSI: u32 = 0x5000_0000;
const DSI_VR: *const u32 = (DSI + 0x000) as *const u32; const DSI_CR: *mut u32 = (DSI + 0x004) as *mut u32; const DSI_CCR: *mut u32 = (DSI + 0x008) as *mut u32; const DSI_LVCIDR: *mut u32 = (DSI + 0x00C) as *mut u32; const DSI_LCOLCR: *mut u32 = (DSI + 0x010) as *mut u32; const DSI_LPCR: *mut u32 = (DSI + 0x014) as *mut u32; const DSI_LPMCR: *mut u32 = (DSI + 0x018) as *mut u32; const DSI_PCR: *mut u32 = (DSI + 0x02C) as *mut u32; const DSI_GVCIDR: *mut u32 = (DSI + 0x030) as *mut u32; const DSI_MCR: *mut u32 = (DSI + 0x034) as *mut u32; const DSI_VMCR: *mut u32 = (DSI + 0x038) as *mut u32; const DSI_VPCR: *mut u32 = (DSI + 0x03C) as *mut u32; const DSI_VCCR: *mut u32 = (DSI + 0x040) as *mut u32; const DSI_VNPCR: *mut u32 = (DSI + 0x044) as *mut u32; const DSI_VHSACR: *mut u32 = (DSI + 0x048) as *mut u32; const DSI_VHBPCR: *mut u32 = (DSI + 0x04C) as *mut u32; const DSI_VLCR: *mut u32 = (DSI + 0x050) as *mut u32; const DSI_VVSACR: *mut u32 = (DSI + 0x054) as *mut u32; const DSI_VVBPCR: *mut u32 = (DSI + 0x058) as *mut u32; const DSI_VVFPCR: *mut u32 = (DSI + 0x05C) as *mut u32; const DSI_VVACR: *mut u32 = (DSI + 0x060) as *mut u32; const DSI_LCCR: *mut u32 = (DSI + 0x064) as *mut u32; const DSI_CMCR: *mut u32 = (DSI + 0x068) as *mut u32; const DSI_GHCR: *mut u32 = (DSI + 0x06C) as *mut u32; const DSI_GPSR: *const u32 = (DSI + 0x074) as *const u32; const DSI_TCCR0: *mut u32 = (DSI + 0x078) as *mut u32; const DSI_CLCR: *mut u32 = (DSI + 0x094) as *mut u32; const DSI_CLTCR: *mut u32 = (DSI + 0x098) as *mut u32; const DSI_DLTCR: *mut u32 = (DSI + 0x09C) as *mut u32; const DSI_PCTLR: *mut u32 = (DSI + 0x0A0) as *mut u32; const DSI_PCONFR: *mut u32 = (DSI + 0x0A4) as *mut u32; const DSI_PSR: *const u32 = (DSI + 0x0B0) as *const u32;
const DSI_W: u32 = DSI + 0x400;
const DSI_WCR: *mut u32 = (DSI_W + 0x04) as *mut u32; const DSI_WIER: *mut u32 = (DSI_W + 0x08) as *mut u32; const DSI_WISR: *const u32 = (DSI_W + 0x0C) as *const u32; const DSI_WIFCR: *mut u32 = (DSI_W + 0x10) as *mut u32; const DSI_WPCR0: *mut u32 = (DSI_W + 0x18) as *mut u32; const DSI_WRPCR: *mut u32 = (DSI_W + 0x30) as *mut u32;
const LTDC: u32 = 0x5000_1000;
const LTDC_SSCR: *mut u32 = (LTDC + 0x008) as *mut u32; const LTDC_BPCR: *mut u32 = (LTDC + 0x00C) as *mut u32; const LTDC_AWCR: *mut u32 = (LTDC + 0x010) as *mut u32; const LTDC_TWCR: *mut u32 = (LTDC + 0x014) as *mut u32; const LTDC_GCR: *mut u32 = (LTDC + 0x018) as *mut u32; const LTDC_SRCR: *mut u32 = (LTDC + 0x024) as *mut u32; const LTDC_BCCR: *mut u32 = (LTDC + 0x02C) as *mut u32;
const LTDC_L1: u32 = LTDC + 0x084;
const LTDC_L1CR: *mut u32 = (LTDC_L1 + 0x00) as *mut u32; const LTDC_L1WHPCR: *mut u32 = (LTDC_L1 + 0x04) as *mut u32; const LTDC_L1WVPCR: *mut u32 = (LTDC_L1 + 0x08) as *mut u32; const LTDC_L1PFCR: *mut u32 = (LTDC_L1 + 0x10) as *mut u32; const LTDC_L1CACR: *mut u32 = (LTDC_L1 + 0x14) as *mut u32; const LTDC_L1BFCR: *mut u32 = (LTDC_L1 + 0x1C) as *mut u32; const LTDC_L1CFBAR: *mut u32 = (LTDC_L1 + 0x28) as *mut u32; const LTDC_L1CFBLR: *mut u32 = (LTDC_L1 + 0x2C) as *mut u32; const LTDC_L1CFBLNR: *mut u32 = (LTDC_L1 + 0x30) as *mut u32;
const RCC: u32 = 0x5802_4400;
const RCC_CR: *mut u32 = (RCC + 0x000) as *mut u32; const RCC_AHB3ENR: *mut u32 = (RCC + 0x0D4) as *mut u32; const RCC_APB3ENR: *mut u32 = (RCC + 0x0E4) as *mut u32;
const GPIOG: u32 = 0x5802_1800;
const GPIOG_BSRR: *mut u32 = (GPIOG + 0x18) as *mut u32;
const GPIOJ: u32 = 0x5802_2400;
const GPIOJ_MODER: *mut u32 = (GPIOJ + 0x00) as *mut u32; const GPIOJ_BSRR: *mut u32 = (GPIOJ + 0x18) as *mut u32;
pub const PANEL_W: u16 = 480;
pub const PANEL_H: u16 = 800;
pub const HSW: u16 = 2;
pub const HBP: u16 = 34;
pub const HFP: u16 = 34;
pub const VSW: u16 = 120;
pub const VBP: u16 = 150;
pub const VFP: u16 = 150;
#[inline(always)]
fn delay_cycles(cycles: u32) {
cortex_m::asm::delay(cycles);
}
fn u1_putc(c: u8) {
const U1_ISR: *const u32 = (0x4001_1000 + 0x1C) as *const u32; const U1_TDR: *mut u32 = (0x4001_1000 + 0x28) as *mut u32; unsafe {
let mut tries = 100_000u32;
while U1_ISR.read_volatile() & (1 << 7) == 0 {
tries -= 1;
if tries == 0 {
return;
}
}
U1_TDR.write_volatile(c as u32);
}
}
fn u1_str(s: &[u8]) {
for &b in s {
u1_putc(b);
}
}
fn u1_hex(v: u32) {
const HEX: &[u8; 16] = b"0123456789abcdef";
for i in (0..8).rev() {
let nibble = ((v >> (i * 4)) & 0xF) as usize;
u1_putc(HEX[nibble]);
}
}
unsafe fn pulse_panel_reset() {
unsafe {
const GPIOG_MODER: *mut u32 = GPIOG as *mut u32; let moder = GPIOG_MODER.read_volatile();
GPIOG_MODER.write_volatile((moder & !(3u32 << 6)) | (1u32 << 6));
GPIOG_BSRR.write_volatile(1u32 << 19);
delay_cycles(4_000_000); GPIOG_BSRR.write_volatile(1u32 << 3);
delay_cycles(4_000_000); }
}
unsafe fn enable_backlight() {
unsafe {
let moder = GPIOJ_MODER.read_volatile();
GPIOJ_MODER.write_volatile((moder & !(3u32 << 24)) | (1u32 << 24));
GPIOJ_BSRR.write_volatile(1u32 << 12);
}
}
pub unsafe fn init_dsi_regulator() -> bool {
unsafe {
let wrpcr = DSI_WRPCR.read_volatile();
DSI_WRPCR.write_volatile(wrpcr | (1 << 24));
let mut tries = 1_000_000u32;
while DSI_WISR.read_volatile() & (1 << 12) == 0 {
tries -= 1;
if tries == 0 {
return false;
}
cortex_m::asm::nop();
}
true
}
}
pub unsafe fn init_dsi_pll() -> bool {
unsafe {
let val: u32 = (1 << 24) | (1 << 0) | ((5u32 & 0x0F) << 11) | ((100u32 & 0x7F) << 2) | ((0u32 & 0x03) << 16); DSI_WRPCR.write_volatile(val);
let mut tries = 1_000_000u32;
while DSI_WISR.read_volatile() & (1 << 8) == 0 {
tries -= 1;
if tries == 0 {
return false;
}
cortex_m::asm::nop();
}
true
}
}
pub unsafe fn init_dsi_phy() {
unsafe {
DSI_CR.write_volatile(1); DSI_CCR.write_volatile(4);
let pctlr = DSI_PCTLR.read_volatile();
DSI_PCTLR.write_volatile(pctlr | (1 << 1));
let pctlr = DSI_PCTLR.read_volatile();
DSI_PCTLR.write_volatile(pctlr | (1 << 2));
DSI_PCONFR.write_volatile((1u32 & 0x3) | ((0x28u32 & 0xFF) << 8));
let mut tries = 1_000_000u32;
loop {
let psr = DSI_PSR.read_volatile();
if psr & 0x0E == 0x0E {
break;
}
tries -= 1;
if tries == 0 {
break;
}
cortex_m::asm::nop();
}
let wpcr0 = DSI_WPCR0.read_volatile();
DSI_WPCR0.write_volatile((wpcr0 & !0x3F) | 8);
DSI_CR.write_volatile(0);
DSI_CLCR.write_volatile(0x03); }
}
pub unsafe fn init_dsi_lane_timings() {
unsafe {
DSI_CLTCR.write_volatile((50u32 << 16) | 50);
DSI_DLTCR.write_volatile((15u32 << 24) | (50u32 << 16) | 50);
}
}
pub unsafe fn init_dsi_flow_control() {
unsafe {
DSI_PCR.write_volatile(0x15); }
}
pub unsafe fn init_dsi_ltdc_interface() {
unsafe {
DSI_LVCIDR.write_volatile(0); DSI_LCOLCR.write_volatile((1 << 8) | 5);
DSI_LPCR.write_volatile(0);
}
}
pub unsafe fn init_dsi_video_timings(
width: u16,
height: u16,
hsw: u16,
hbp: u16,
hfp: u16,
vsw: u16,
vbp: u16,
vfp: u16,
) {
unsafe {
let lane_byte_clk: u32 = 62500; let pixel_clk: u32 = 27500; let total_pixels = (hsw as u32) + (hbp as u32) + (width as u32) + (hfp as u32);
let hsa_dsi = (hsw as u32) * lane_byte_clk / pixel_clk;
let hbp_dsi = (hbp as u32) * lane_byte_clk / pixel_clk;
let hline_dsi = total_pixels * lane_byte_clk / pixel_clk;
DSI_VHSACR.write_volatile(hsa_dsi & 0xFFF);
DSI_VHBPCR.write_volatile(hbp_dsi & 0xFFF);
DSI_VLCR.write_volatile(hline_dsi & 0x7FFF);
DSI_VVSACR.write_volatile(vsw as u32 & 0x3FF);
DSI_VVBPCR.write_volatile(vbp as u32 & 0x3FF);
DSI_VVFPCR.write_volatile(vfp as u32 & 0x3FF);
DSI_VVACR.write_volatile(height as u32 & 0x3FFF);
DSI_VPCR.write_volatile(width as u32 & 0x3FFF);
DSI_VCCR.write_volatile(0);
DSI_VNPCR.write_volatile(0xFFF);
DSI_VMCR.write_volatile(
(0b10 << 0)
| (1 << 8)
| (1 << 9)
| (1 << 10)
| (1 << 11)
| (1 << 12)
| (1 << 13)
| (1 << 15),
);
DSI_LPMCR.write_volatile((64u32 << 16) | 64);
}
}
pub unsafe fn enable_display_peripheral_clocks() {
unsafe {
let ahb3 = RCC_AHB3ENR.read_volatile();
RCC_AHB3ENR.write_volatile(ahb3 | (1 << 4));
let apb3 = RCC_APB3ENR.read_volatile();
RCC_APB3ENR.write_volatile(apb3 | (1 << 3) | (1 << 4));
const RCC_AHB4ENR: *mut u32 = (RCC + 0x0E0) as *mut u32; let ahb4 = RCC_AHB4ENR.read_volatile();
RCC_AHB4ENR.write_volatile(ahb4 | (1 << 6) | (1 << 9));
const RCC_AHB3LPENR: *mut u32 = (RCC + 0x13C) as *mut u32; const RCC_APB3LPENR: *mut u32 = (RCC + 0x14C) as *mut u32; const RCC_AHB4LPENR: *mut u32 = (RCC + 0x148) as *mut u32; const RCC_C1_AHB3LPENR: *mut u32 = (RCC + 0x19C) as *mut u32; const RCC_C1_APB3LPENR: *mut u32 = (RCC + 0x1AC) as *mut u32; const RCC_C1_AHB4LPENR: *mut u32 = (RCC + 0x1A8) as *mut u32; let ahb3lp_mask = (1 << 4) | (1 << 12);
let apb3lp_mask = (1 << 3) | (1 << 4); let ahb4lp_mask = (1 << 6) | (1 << 9); let ahb3lp = RCC_AHB3LPENR.read_volatile();
RCC_AHB3LPENR.write_volatile(ahb3lp | ahb3lp_mask);
let apb3lp = RCC_APB3LPENR.read_volatile();
RCC_APB3LPENR.write_volatile(apb3lp | apb3lp_mask);
let ahb4lp = RCC_AHB4LPENR.read_volatile();
RCC_AHB4LPENR.write_volatile(ahb4lp | ahb4lp_mask);
let c1_ahb3lp = RCC_C1_AHB3LPENR.read_volatile();
RCC_C1_AHB3LPENR.write_volatile(c1_ahb3lp | ahb3lp_mask);
let c1_apb3lp = RCC_C1_APB3LPENR.read_volatile();
RCC_C1_APB3LPENR.write_volatile(c1_apb3lp | apb3lp_mask);
let c1_ahb4lp = RCC_C1_AHB4LPENR.read_volatile();
RCC_C1_AHB4LPENR.write_volatile(c1_ahb4lp | ahb4lp_mask);
cortex_m::asm::dsb();
}
}
pub unsafe fn ensure_pll3_running() {
unsafe {
let cr = RCC_CR.read_volatile();
if cr & (1 << 29) == 0 {
RCC_CR.write_volatile(cr | (1 << 28)); let mut tries = 1_000_000u32;
while RCC_CR.read_volatile() & (1 << 29) == 0 {
tries -= 1;
if tries == 0 {
break;
}
cortex_m::asm::nop();
}
}
}
}
pub unsafe fn configure_ltdc_timing(
width: u16,
height: u16,
hsw: u16,
hbp: u16,
hfp: u16,
vsw: u16,
vbp: u16,
vfp: u16,
) {
unsafe {
let vsh = vsw;
let hswm1 = (hsw.saturating_sub(1)) as u32;
let vshm1 = (vsh.saturating_sub(1)) as u32;
let ahbp = (hsw as u32 + hbp as u32).saturating_sub(1);
let avbp = (vsh as u32 + vbp as u32).saturating_sub(1);
let aaw = (hsw as u32 + hbp as u32 + width as u32).saturating_sub(1);
let aah = (vsh as u32 + vbp as u32 + height as u32).saturating_sub(1);
let totalw = (hsw as u32 + hbp as u32 + width as u32 + hfp as u32).saturating_sub(1);
let totalh = (vsh as u32 + vbp as u32 + height as u32 + vfp as u32).saturating_sub(1);
LTDC_SSCR.write_volatile((hswm1 << 16) | vshm1);
LTDC_BPCR.write_volatile((ahbp << 16) | avbp);
LTDC_AWCR.write_volatile((aaw << 16) | aah);
LTDC_TWCR.write_volatile((totalw << 16) | totalh);
LTDC_BCCR.write_volatile(0);
}
}
pub unsafe fn setup_ltdc_layer(
fb_addr: u32,
width: u16,
height: u16,
hsw: u16,
hbp: u16,
vsw: u16,
vbp: u16,
) {
unsafe {
let pitch = (width as u32) * 4; let x0 = (hsw as u32) + (hbp as u32); let x1 = x0 + (width as u32) - 1;
let y0 = (vsw as u32) + (vbp as u32); let y1 = y0 + (height as u32) - 1;
LTDC_L1WHPCR.write_volatile((x1 << 16) | x0);
LTDC_L1WVPCR.write_volatile((y1 << 16) | y0);
LTDC_L1PFCR.write_volatile(0); LTDC_L1CACR.write_volatile(255); LTDC_L1BFCR.write_volatile(0x0405); LTDC_L1CFBAR.write_volatile(fb_addr);
LTDC_L1CFBLR.write_volatile((pitch << 16) | (pitch + 3));
LTDC_L1CFBLNR.write_volatile(height as u32);
let cr = LTDC_L1CR.read_volatile();
LTDC_L1CR.write_volatile(cr | 1);
LTDC_SRCR.write_volatile(1);
}
}
pub unsafe fn enable_ltdc() {
unsafe {
LTDC_GCR.write_volatile(0x0000_2221);
LTDC_SRCR.write_volatile(1);
cortex_m::asm::dsb();
}
}
unsafe fn wait_cmd_fifo_empty() -> bool {
unsafe {
let mut tries = 1_000_000u32;
while DSI_GPSR.read_volatile() & 1 == 0 {
tries -= 1;
if tries == 0 {
return false;
}
cortex_m::asm::nop();
}
true
}
}
unsafe fn dcs_short_write(cmd: u8) -> bool {
unsafe {
if !wait_cmd_fifo_empty() {
return false;
}
DSI_GHCR.write_volatile(0x05u32 | ((cmd as u32) << 8));
true
}
}
unsafe fn dcs_short_write1(cmd: u8, param: u8) -> bool {
unsafe {
if !wait_cmd_fifo_empty() {
return false;
}
DSI_GHCR.write_volatile(0x15u32 | ((cmd as u32) << 8) | ((param as u32) << 16));
true
}
}
pub unsafe fn init_nt35510_panel() -> bool {
unsafe {
let p = stm32h7::stm32h747cm7::Peripherals::steal();
let mut dsi = p.DSIHOST;
crate::nt35510::Nt35510::init(&mut dsi)
}
}
pub unsafe fn init_full_adapted_cmd(fb_addr: u32) -> bool {
unsafe {
u1_str(b"\r\nDSI[start]\r\n");
u1_str(b"DSI[2 reg ");
let ok = init_dsi_regulator();
u1_str(if ok { b"OK]\r\n" } else { b"FAIL]\r\n" });
if !ok {
return false;
}
u1_str(b"DSI[3 pll ");
let ok = init_dsi_pll();
u1_str(if ok { b"OK]\r\n" } else { b"FAIL]\r\n" });
if !ok {
return false;
}
u1_str(b"DSI[4 phy]\r\n");
init_dsi_phy();
u1_str(b"DSI[5 lane]\r\n");
init_dsi_lane_timings();
u1_str(b"DSI[6 flow]\r\n");
init_dsi_flow_control();
u1_str(b"DSI[7 ltdc-if]\r\n");
init_dsi_ltdc_interface();
u1_str(b"DSI[8 vtim]\r\n");
init_dsi_video_timings(PANEL_W, PANEL_H, HSW, HBP, HFP, VSW, VBP, VFP);
u1_str(b"DSI[9 acm]\r\n");
dsi_cmd_mode::configure_te_gpio();
dsi_cmd_mode::configure_adapted_cmd_mode(PANEL_W);
u1_str(b"DSI[10 start]\r\n");
dsi_cmd_mode::start_dsi();
u1_str(b"DSI[13 panel ");
dsi_cmd_mode::enable_lp_cmd_overrides();
#[cfg(not(feature = "zephyr"))]
pulse_panel_reset();
let panel_ok = init_nt35510_panel();
dsi_cmd_mode::disable_lp_cmd_overrides();
u1_str(if panel_ok { b"OK]\r\n" } else { b"FAIL]\r\n" });
if !panel_ok {
return false;
}
u1_str(b"DSI[14 ltdc-cfg]\r\n");
configure_ltdc_timing(PANEL_W, PANEL_H, HSW, HBP, HFP, VSW, VBP, VFP);
setup_ltdc_layer(fb_addr, PANEL_W, PANEL_H, HSW, HBP, VSW, VBP);
enable_ltdc();
u1_str(b"DSI[BL]\r\n");
enable_backlight();
delay_cycles(8_000_000); DSI_WCR.write_volatile(0x0C); cortex_m::asm::dsb();
delay_cycles(8_000_000); u1_str(b"DSI[done]\r\n");
true
}
}
#[allow(dead_code)]
const _: () = {
let _ = DSI_VR;
let _ = DSI_GVCIDR;
let _ = DSI_MCR;
let _ = DSI_LCCR;
let _ = DSI_TCCR0;
let _ = DSI_WIER;
let _ = DSI_WIFCR;
};
pub unsafe fn dump_registers() {
unsafe fn line(name: &[u8], v: u32) {
u1_str(name);
u1_putc(b'=');
u1_str(b"0x");
u1_hex(v);
u1_str(b"\r\n");
}
unsafe {
u1_str(b"\r\n--- DSI/LTDC register dump ---\r\n");
const RCC_PLLCKSELR: *const u32 = (RCC + 0x028) as *const u32; const RCC_PLLCFGR: *const u32 = (RCC + 0x02C) as *const u32; const RCC_PLL3DIVR: *const u32 = (RCC + 0x040) as *const u32; const RCC_PLL3FRACR: *const u32 = (RCC + 0x044) as *const u32; line(b"RCC.CR ", RCC_CR.cast_const().read_volatile());
line(b"RCC.PLLCKSELR ", RCC_PLLCKSELR.read_volatile());
line(b"RCC.PLLCFGR ", RCC_PLLCFGR.read_volatile());
line(b"RCC.PLL3DIVR ", RCC_PLL3DIVR.read_volatile());
line(b"RCC.PLL3FRACR ", RCC_PLL3FRACR.read_volatile());
const RCC_AHB3ENR_R: *const u32 = (RCC + 0x0D4) as *const u32; const RCC_APB3ENR_R: *const u32 = (RCC + 0x0E4) as *const u32; const RCC_AHB4ENR_R: *const u32 = (RCC + 0x0E0) as *const u32; const RCC_D1CCIPR: *const u32 = (RCC + 0x04C) as *const u32; line(b"RCC.AHB3ENR ", RCC_AHB3ENR_R.read_volatile());
line(b"RCC.AHB4ENR ", RCC_AHB4ENR_R.read_volatile());
line(b"RCC.APB3ENR ", RCC_APB3ENR_R.read_volatile());
line(b"RCC.D1CCIPR ", RCC_D1CCIPR.read_volatile());
const RCC_AHB3RSTR_R: *const u32 = (RCC + 0x07C) as *const u32; const RCC_APB3RSTR_R: *const u32 = (RCC + 0x08C) as *const u32; line(b"RCC.AHB3RSTR ", RCC_AHB3RSTR_R.read_volatile());
line(b"RCC.APB3RSTR ", RCC_APB3RSTR_R.read_volatile());
const RCC_C1_AHB3ENR: *const u32 = (RCC + 0x134) as *const u32; const RCC_C1_AHB4ENR: *const u32 = (RCC + 0x140) as *const u32; const RCC_C1_APB3ENR: *const u32 = (RCC + 0x144) as *const u32; const RCC_C1_AHB3LPENR: *const u32 = (RCC + 0x19C) as *const u32; const RCC_C1_AHB4LPENR: *const u32 = (RCC + 0x1A8) as *const u32; const RCC_C1_APB3LPENR: *const u32 = (RCC + 0x1AC) as *const u32; line(b"RCC.C1_AHB3EN ", RCC_C1_AHB3ENR.read_volatile());
line(b"RCC.C1_AHB4EN ", RCC_C1_AHB4ENR.read_volatile());
line(b"RCC.C1_APB3EN ", RCC_C1_APB3ENR.read_volatile());
line(b"RCC.C1_AHB3LP ", RCC_C1_AHB3LPENR.read_volatile());
line(b"RCC.C1_AHB4LP ", RCC_C1_AHB4LPENR.read_volatile());
line(b"RCC.C1_APB3LP ", RCC_C1_APB3LPENR.read_volatile());
line(b"DSI.VR ", DSI_VR.read_volatile());
line(b"DSI.CR ", DSI_CR.cast_const().read_volatile());
line(b"DSI.CCR ", DSI_CCR.cast_const().read_volatile());
line(b"DSI.LVCIDR ", DSI_LVCIDR.cast_const().read_volatile());
line(b"DSI.LCOLCR ", DSI_LCOLCR.cast_const().read_volatile());
line(b"DSI.LPCR ", DSI_LPCR.cast_const().read_volatile());
line(b"DSI.LPMCR ", DSI_LPMCR.cast_const().read_volatile());
line(b"DSI.PCR ", DSI_PCR.cast_const().read_volatile());
line(b"DSI.MCR ", DSI_MCR.cast_const().read_volatile());
line(b"DSI.VMCR ", DSI_VMCR.cast_const().read_volatile());
line(b"DSI.VPCR ", DSI_VPCR.cast_const().read_volatile());
line(b"DSI.VHSACR ", DSI_VHSACR.cast_const().read_volatile());
line(b"DSI.VHBPCR ", DSI_VHBPCR.cast_const().read_volatile());
line(b"DSI.VLCR ", DSI_VLCR.cast_const().read_volatile());
line(b"DSI.VVSACR ", DSI_VVSACR.cast_const().read_volatile());
line(b"DSI.VVBPCR ", DSI_VVBPCR.cast_const().read_volatile());
line(b"DSI.VVFPCR ", DSI_VVFPCR.cast_const().read_volatile());
line(b"DSI.VVACR ", DSI_VVACR.cast_const().read_volatile());
line(b"DSI.LCCR ", DSI_LCCR.cast_const().read_volatile());
line(b"DSI.CMCR ", DSI_CMCR.cast_const().read_volatile());
line(b"DSI.GPSR ", DSI_GPSR.read_volatile());
line(b"DSI.PSR ", DSI_PSR.read_volatile());
line(b"DSI.PCONFR ", DSI_PCONFR.cast_const().read_volatile());
const DSI_WCFGR: *const u32 = DSI_W as *const u32; line(b"DSI.WCFGR ", DSI_WCFGR.read_volatile());
line(b"DSI.WCR ", DSI_WCR.cast_const().read_volatile());
line(b"DSI.WIER ", DSI_WIER.cast_const().read_volatile());
line(b"DSI.WISR ", DSI_WISR.read_volatile());
line(b"DSI.WPCR0 ", DSI_WPCR0.cast_const().read_volatile());
line(b"DSI.WRPCR ", DSI_WRPCR.cast_const().read_volatile());
line(b"LTDC.SSCR ", LTDC_SSCR.cast_const().read_volatile());
line(b"LTDC.BPCR ", LTDC_BPCR.cast_const().read_volatile());
line(b"LTDC.AWCR ", LTDC_AWCR.cast_const().read_volatile());
line(b"LTDC.TWCR ", LTDC_TWCR.cast_const().read_volatile());
line(b"LTDC.GCR ", LTDC_GCR.cast_const().read_volatile());
line(b"LTDC.BCCR ", LTDC_BCCR.cast_const().read_volatile());
line(b"LTDC.L1CR ", LTDC_L1CR.cast_const().read_volatile());
line(b"LTDC.L1WHPCR ", LTDC_L1WHPCR.cast_const().read_volatile());
line(b"LTDC.L1WVPCR ", LTDC_L1WVPCR.cast_const().read_volatile());
line(b"LTDC.L1PFCR ", LTDC_L1PFCR.cast_const().read_volatile());
line(b"LTDC.L1CFBAR ", LTDC_L1CFBAR.cast_const().read_volatile());
line(b"LTDC.L1CFBLR ", LTDC_L1CFBLR.cast_const().read_volatile());
line(
b"LTDC.L1CFBLNR ",
LTDC_L1CFBLNR.cast_const().read_volatile(),
);
u1_str(b"--- end dump ---\r\n");
}
}