error handling

This commit is contained in:
2025-09-13 15:02:15 +02:00
parent 31d52e2441
commit 981a6cd65c
6 changed files with 22 additions and 14 deletions

View File

@@ -77,7 +77,7 @@ pub fn gpio_get_state(gpio: u8) -> u8 {
let register_addr = GPLEV_BASE + (register_index as u32 * 4);
let state = mmio_read(register_addr);
return ((state >> register_offset) & 0b1) as u8;
((state >> register_offset) & 0b1) as u8
}
/// Pull GPIO up

View File

@@ -20,7 +20,7 @@ const UART0_CR: u32 = 0x3F20_1030;
const UART0_CR_UARTEN: u32 = 1 << 0;
const UART0_CR_TXE: u32 = 1 << 8;
const UART0_LCRH: u32 = 0x3F20_102c;
const UART0_LCRH: u32 = 0x3F20_102C;
const UART0_LCRH_FEN: u32 = 1 << 4;
pub struct Uart;