Let get_flash_regions be public

This commit is contained in:
Rasmus Melchior Jacobsen 2023-03-31 15:47:45 +02:00
parent f3dcb5eb22
commit 50b0fb1a37
6 changed files with 7 additions and 7 deletions

View file

@ -7,7 +7,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE};
use crate::flash::Error;
use crate::pac;
pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub const fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}

View file

@ -91,7 +91,7 @@ mod alt_regions {
pub use alt_regions::{AltFlashLayout, ALT_FLASH_REGIONS};
#[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479))]
pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub fn get_flash_regions() -> &'static [&'static FlashRegion] {
if unsafe { pac::FLASH.optcr().read().db1m() } {
&ALT_FLASH_REGIONS
} else {
@ -100,7 +100,7 @@ pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] {
}
#[cfg(not(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f469, stm32f479)))]
pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub const fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}

View file

@ -6,7 +6,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE};
use crate::flash::Error;
use crate::pac;
pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub const fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}

View file

@ -11,7 +11,7 @@ const fn is_dual_bank() -> bool {
FLASH_REGIONS.len() == 2
}
pub(crate) fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}

View file

@ -6,7 +6,7 @@ use super::{FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE};
use crate::flash::Error;
use crate::pac;
pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub const fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}

View file

@ -2,7 +2,7 @@
use super::{Error, FlashRegion, FlashSector, FLASH_REGIONS, WRITE_SIZE};
pub(crate) const fn get_flash_regions() -> &'static [&'static FlashRegion] {
pub const fn get_flash_regions() -> &'static [&'static FlashRegion] {
&FLASH_REGIONS
}