diff options
Diffstat (limited to 'embassy-rp/src/flash.rs')
| -rw-r--r-- | embassy-rp/src/flash.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-rp/src/flash.rs b/embassy-rp/src/flash.rs index 8c809090e..7cc8f0c1d 100644 --- a/embassy-rp/src/flash.rs +++ b/embassy-rp/src/flash.rs | |||
| @@ -6,8 +6,8 @@ use core::task::{Context, Poll}; | |||
| 6 | 6 | ||
| 7 | use embassy_hal_internal::{Peri, PeripheralType}; | 7 | use embassy_hal_internal::{Peri, PeripheralType}; |
| 8 | use embedded_storage::nor_flash::{ | 8 | use embedded_storage::nor_flash::{ |
| 9 | check_erase, check_read, check_write, ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, | 9 | ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash, check_erase, check_read, |
| 10 | ReadNorFlash, | 10 | check_write, |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | use crate::dma::{AnyChannel, Channel, Transfer}; | 13 | use crate::dma::{AnyChannel, Channel, Transfer}; |
| @@ -627,7 +627,7 @@ mod ram_helpers { | |||
| 627 | /// Length of data must be a multiple of 4096 | 627 | /// Length of data must be a multiple of 4096 |
| 628 | /// addr must be aligned to 4096 | 628 | /// addr must be aligned to 4096 |
| 629 | #[inline(never)] | 629 | #[inline(never)] |
| 630 | #[link_section = ".data.ram_func"] | 630 | #[unsafe(link_section = ".data.ram_func")] |
| 631 | #[cfg(feature = "rp2040")] | 631 | #[cfg(feature = "rp2040")] |
| 632 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { | 632 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { |
| 633 | #[cfg(target_arch = "arm")] | 633 | #[cfg(target_arch = "arm")] |
| @@ -692,7 +692,7 @@ mod ram_helpers { | |||
| 692 | /// Length of data must be a multiple of 4096 | 692 | /// Length of data must be a multiple of 4096 |
| 693 | /// addr must be aligned to 4096 | 693 | /// addr must be aligned to 4096 |
| 694 | #[inline(never)] | 694 | #[inline(never)] |
| 695 | #[link_section = ".data.ram_func"] | 695 | #[unsafe(link_section = ".data.ram_func")] |
| 696 | #[cfg(feature = "_rp235x")] | 696 | #[cfg(feature = "_rp235x")] |
| 697 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { | 697 | unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { |
| 698 | let data = data.map(|d| d.as_ptr()).unwrap_or(core::ptr::null()); | 698 | let data = data.map(|d| d.as_ptr()).unwrap_or(core::ptr::null()); |
| @@ -811,7 +811,7 @@ mod ram_helpers { | |||
| 811 | /// | 811 | /// |
| 812 | /// Credit: taken from `rp2040-flash` (also licensed Apache+MIT) | 812 | /// Credit: taken from `rp2040-flash` (also licensed Apache+MIT) |
| 813 | #[inline(never)] | 813 | #[inline(never)] |
| 814 | #[link_section = ".data.ram_func"] | 814 | #[unsafe(link_section = ".data.ram_func")] |
| 815 | #[cfg(feature = "rp2040")] | 815 | #[cfg(feature = "rp2040")] |
| 816 | unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) { | 816 | unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) { |
| 817 | #[cfg(target_arch = "arm")] | 817 | #[cfg(target_arch = "arm")] |
