diff options
| author | Hiroaki Yutani <[email protected]> | 2025-05-06 09:09:22 +0900 |
|---|---|---|
| committer | Hiroaki Yutani <[email protected]> | 2025-05-06 09:09:22 +0900 |
| commit | 0460a924ac06a7dd33b4e50396948ba9bcb5374e (patch) | |
| tree | 8d9dc305d058709557e61674bf28e7ae3637b142 /examples/stm32h7/src/bin/sai.rs | |
| parent | 93ff90db04f06316f0992b65a0319ebdf74ce5c4 (diff) | |
chore: Wrap link_section attribute with unsafe
Diffstat (limited to 'examples/stm32h7/src/bin/sai.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/sai.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/sai.rs b/examples/stm32h7/src/bin/sai.rs index 95ffe257a..c2bf7d6f2 100644 --- a/examples/stm32h7/src/bin/sai.rs +++ b/examples/stm32h7/src/bin/sai.rs | |||
| @@ -16,9 +16,9 @@ const DMA_BUFFER_LENGTH: usize = HALF_DMA_BUFFER_LENGTH * 2; // 2 half-blocks | |||
| 16 | const SAMPLE_RATE: u32 = 48000; | 16 | const SAMPLE_RATE: u32 = 48000; |
| 17 | 17 | ||
| 18 | //DMA buffer must be in special region. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions | 18 | //DMA buffer must be in special region. Refer https://embassy.dev/book/#_stm32_bdma_only_working_out_of_some_ram_regions |
| 19 | #[link_section = ".sram1_bss"] | 19 | #[unsafe(link_section = ".sram1_bss")] |
| 20 | static mut TX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 20 | static mut TX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 21 | #[link_section = ".sram1_bss"] | 21 | #[unsafe(link_section = ".sram1_bss")] |
| 22 | static mut RX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); | 22 | static mut RX_BUFFER: GroundedArrayCell<u32, DMA_BUFFER_LENGTH> = GroundedArrayCell::uninit(); |
| 23 | 23 | ||
| 24 | #[embassy_executor::main] | 24 | #[embassy_executor::main] |
