diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-03-31 15:47:45 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-03-31 15:47:45 +0200 |
| commit | 50b0fb1a376dbc650db785228b181cc3939ac87f (patch) | |
| tree | befa7e8c871eaac9b979127b5b382095fd6a0068 | |
| parent | f3dcb5eb22dfac21024e77023d1967b4eaa0b176 (diff) | |
Let get_flash_regions be public
| -rw-r--r-- | embassy-stm32/src/flash/f3.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/flash/f4.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/flash/f7.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/flash/h7.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/flash/l.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/flash/other.rs | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/embassy-stm32/src/flash/f3.rs b/embassy-stm32/src/flash/f3.rs index c1ed33f9d..10a09c42c 100644 --- a/embassy-stm32/src/flash/f3.rs +++ b/embassy-stm32/src/flash/f3.rs | |||
| @@ -7,7 +7,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; | |||
| 7 | use crate::flash::Error; | 7 | use crate::flash::Error; |
| 8 | use crate::pac; | 8 | use crate::pac; |
| 9 | 9 | ||
| 10 | pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] { | 10 | pub const fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 11 | &FLASH_REGIONS | 11 | &FLASH_REGIONS |
| 12 | } | 12 | } |
| 13 | 13 | ||
diff --git a/embassy-stm32/src/flash/f4.rs b/embassy-stm32/src/flash/f4.rs index 61ac8afd5..2f5b417cc 100644 --- a/embassy-stm32/src/flash/f4.rs +++ b/embassy-stm32/src/flash/f4.rs | |||
| @@ -91,7 +91,7 @@ mod alt_regions { | |||
| 91 | pub use alt_regions::{AltFlashLayout, ALT_FLASH_REGIONS}; | 91 | pub use alt_regions::{AltFlashLayout, ALT_FLASH_REGIONS}; |
| 92 | 92 | ||
| 93 | #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479))] | 93 | #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479))] |
| 94 | pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] { | 94 | pub fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 95 | if unsafe { pac::FLASH.optcr().read().db1m() } { | 95 | if unsafe { pac::FLASH.optcr().read().db1m() } { |
| 96 | &ALT_FLASH_REGIONS | 96 | &ALT_FLASH_REGIONS |
| 97 | } else { | 97 | } else { |
| @@ -100,7 +100,7 @@ pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] { | |||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | #[cfg(not(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479)))] | 102 | #[cfg(not(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479)))] |
| 103 | pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] { | 103 | pub const fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 104 | &FLASH_REGIONS | 104 | &FLASH_REGIONS |
| 105 | } | 105 | } |
| 106 | 106 | ||
diff --git a/embassy-stm32/src/flash/f7.rs b/embassy-stm32/src/flash/f7.rs index 7111f5cc4..6427d5a09 100644 --- a/embassy-stm32/src/flash/f7.rs +++ b/embassy-stm32/src/flash/f7.rs | |||
| @@ -6,7 +6,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; | |||
| 6 | use crate::flash::Error; | 6 | use crate::flash::Error; |
| 7 | use crate::pac; | 7 | use crate::pac; |
| 8 | 8 | ||
| 9 | pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] { | 9 | pub const fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 10 | &FLASH_REGIONS | 10 | &FLASH_REGIONS |
| 11 | } | 11 | } |
| 12 | 12 | ||
diff --git a/embassy-stm32/src/flash/h7.rs b/embassy-stm32/src/flash/h7.rs index 5ea57ccde..4f38d50c0 100644 --- a/embassy-stm32/src/flash/h7.rs +++ b/embassy-stm32/src/flash/h7.rs | |||
| @@ -11,7 +11,7 @@ const fn is_dual_bank() -> bool { | |||
| 11 | FLASH_REGIONS.len() == 2 | 11 | FLASH_REGIONS.len() == 2 |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] { | 14 | pub fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 15 | &FLASH_REGIONS | 15 | &FLASH_REGIONS |
| 16 | } | 16 | } |
| 17 | 17 | ||
diff --git a/embassy-stm32/src/flash/l.rs b/embassy-stm32/src/flash/l.rs index f5ebc0a5f..7d9cc6ea3 100644 --- a/embassy-stm32/src/flash/l.rs +++ b/embassy-stm32/src/flash/l.rs | |||
| @@ -6,7 +6,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; | |||
| 6 | use crate::flash::Error; | 6 | use crate::flash::Error; |
| 7 | use crate::pac; | 7 | use crate::pac; |
| 8 | 8 | ||
| 9 | pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] { | 9 | pub const fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 10 | &FLASH_REGIONS | 10 | &FLASH_REGIONS |
| 11 | } | 11 | } |
| 12 | 12 | ||
diff --git a/embassy-stm32/src/flash/other.rs b/embassy-stm32/src/flash/other.rs index d329dcab4..c151cb828 100644 --- a/embassy-stm32/src/flash/other.rs +++ b/embassy-stm32/src/flash/other.rs | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | use super::{Error, FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; | 3 | use super::{Error, FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE}; |
| 4 | 4 | ||
| 5 | pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] { | 5 | pub const fn get_flash_regions() -> &'static [&'static FlashRegion] { |
| 6 | &FLASH_REGIONS | 6 | &FLASH_REGIONS |
| 7 | } | 7 | } |
| 8 | 8 | ||
