diff --git a/src/serial.rs b/src/serial.rs index da4c404..0cdd83c 100644 --- a/src/serial.rs +++ b/src/serial.rs @@ -419,6 +419,7 @@ impl crate::hal::serial::Write for Tx { // NOTE(unsafe) atomic write to stateless register // NOTE(write_volatile) 8-bit write that's not possible through the svd2rust API unsafe { + #[allow(invalid_reference_casting)] ptr::write_volatile(&(*USART::ptr()).data as *const _ as *mut _, byte) } Ok(())