unsafe
handling
This commit is contained in:
parent
28f3f9f355
commit
98d4d3a715
2 changed files with 3 additions and 1 deletions
|
@ -80,6 +80,7 @@ pub struct DMX<const DMX_LEN: usize> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<const DMX_LEN: usize> DMX<DMX_LEN> {
|
impl<const DMX_LEN: usize> DMX<DMX_LEN> {
|
||||||
|
#[allow(unsafe_code)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
mem: &'static mut [u8],
|
mem: &'static mut [u8],
|
||||||
mut dma_channel: dma::dma1::C4,
|
mut dma_channel: dma::dma1::C4,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// #![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ mod app {
|
||||||
int_pin: gpio::gpiob::PB10<gpio::Input<gpio::PullUp>>,
|
int_pin: gpio::gpiob::PB10<gpio::Input<gpio::PullUp>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unsafe_code)]
|
||||||
#[init(local = [buffer: [u8; DMX_LEN * 2] = [0b0101_0101; DMX_LEN * 2]])]
|
#[init(local = [buffer: [u8; DMX_LEN * 2] = [0b0101_0101; DMX_LEN * 2]])]
|
||||||
fn init(mut cx: init::Context) -> (Shared, Local, init::Monotonics) {
|
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
|
// Take ownership over the raw flash and rcc devices and convert them into the corresponding
|
||||||
|
|
Loading…
Reference in a new issue