Skip to content

Commit

Permalink
In examples, allow the static_mut_refs lint
Browse files Browse the repository at this point in the history
For the future, need to investigate:
* How to implement DMA without requiring the lifetime of the buffer to be
'static
* How to specific the link_section of non-static buffers
  • Loading branch information
richardeoin committed Nov 29, 2024
1 parent 5166da8 commit 57ff955
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/dma.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Example of Memory to Memory Transfer with the DMA

#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/ethernet-nucleo-h743zi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//! This demo does not use smoltcp - see the ethernet-rtic-stm32h747i-disco demo
//! for an example of smoltcp
#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/i2c4_bdma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//!

#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_std]
#![no_main]

Expand Down
1 change: 1 addition & 0 deletions examples/mdma.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Example of Memory to Memory Transfer with the Master DMA (MDMA)

#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/mdma_bursts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//! beats/burst. The latter gives an approximately 25% speedup.

#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/sai_dma_passthru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#![allow(unused_macros)]
#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/serial-dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//! the transfer.

#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/spi-dma-rtic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//!
//! This example demonstrates using DMA to write data over a TX-only SPI interface.
#![deny(warnings)]
#![allow(static_mut_refs)]
#![allow(clippy::type_complexity)]
#![no_main]
#![no_std]
Expand Down
1 change: 1 addition & 0 deletions examples/spi-dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//! the transfer.

#![deny(warnings)]
#![allow(static_mut_refs)]

Check failure on line 11 in examples/spi-dma.rs

View workflow job for this annotation

GitHub Actions / clippy_check

unknown lint: `static_mut_refs`

error: unknown lint: `static_mut_refs` --> examples/spi-dma.rs:11:10 | 11 | #![allow(static_mut_refs)] | ^^^^^^^^^^^^^^^ | note: the lint level is defined here --> examples/spi-dma.rs:10:9 | 10 | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(unknown_lints)]` implied by `#[deny(warnings)]`
#![no_main]
#![no_std]

Expand Down
1 change: 1 addition & 0 deletions examples/usb_passthrough.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! This example uses both USB1 and USB2. This is only possible on devices that
//! have the USB2 peripheral.
#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_std]
#![no_main]

Expand Down
1 change: 1 addition & 0 deletions examples/usb_phy_serial_interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! This example is for RM0433/RM0399 parts. It has been tested on the Arduino
//! Portenta H7
#![deny(warnings)]
#![allow(static_mut_refs)]
#![allow(clippy::type_complexity)]
#![no_std]
#![no_main]
Expand Down
1 change: 1 addition & 0 deletions examples/usb_rtic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//! NUCLEO-H743ZI2 board.
//!
#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_std]
#![no_main]

Expand Down
1 change: 1 addition & 0 deletions examples/usb_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//! NUCLEO-H743ZI2 board.
//!
#![deny(warnings)]
#![allow(static_mut_refs)]
#![no_std]
#![no_main]

Expand Down

0 comments on commit 57ff955

Please sign in to comment.