unsafe handling

This commit is contained in:
Jörn-Michael Miehe 2024-03-25 00:41:57 +00:00
parent 28f3f9f355
commit 98d4d3a715
2 changed files with 3 additions and 1 deletions

View file

@ -80,6 +80,7 @@ pub struct DMX<const DMX_LEN: usize> {
}
impl<const DMX_LEN: usize> DMX<DMX_LEN> {
#[allow(unsafe_code)]
pub fn new(
mem: &'static mut [u8],
mut dma_channel: dma::dma1::C4,

View file

@ -1,4 +1,4 @@
// #![deny(unsafe_code)]
#![deny(unsafe_code)]
#![no_std]
#![no_main]
@ -39,6 +39,7 @@ mod app {
int_pin: gpio::gpiob::PB10<gpio::Input<gpio::PullUp>>,
}
#[allow(unsafe_code)]
#[init(local = [buffer: [u8; DMX_LEN * 2] = [0b0101_0101; DMX_LEN * 2]])]
fn init(mut cx: init::Context) -> (Shared, Local, init::Monotonics) {
// Take ownership over the raw flash and rcc devices and convert them into the corresponding