[−][src]Struct stm32l0xx_hal::flash::FLASH
Entry point to the non-volatile memory (NVM) API
Methods
impl FLASH
[src]
pub fn new(flash: FLASH, rcc: &mut Rcc) -> Self
[src]
pub fn erase_flash_page(&mut self, address: *mut u32) -> Result<(), Error>
[src]
Erases a page of flash memory
Attention: You must make sure that your program is not executed from the same Flash bank that the page is being erased in. Either make sure your program is executed from another Flash bank, or run it from main memory.
Panics
This method will panic, unless all of the following is true:
address
points to Flash memoryaddress
is aligned to a page boundary (32 words, 128 bytes)
pub fn write_word(&mut self, address: *mut u32, word: u32) -> Result<(), Error>
[src]
Writes a word to Flash memory or EEPROM
Please note that any access to Flash or EEPROM on the same memory bank will be stalled until this operation completes.
If you use this method to write to Flash memory, the address must have been erased before, otherwise this method will return an error.
Panics
Panics, if address
does not point to Flash memory or EEPROM.
pub fn write_flash_half_page(
&mut self,
address: *mut u32,
words: &[u32]
) -> Result<(), Error>
[src]
&mut self,
address: *mut u32,
words: &[u32]
) -> Result<(), Error>
Writes a half-page (16 words) of Flash memory
The memory written to must have been erased before, otherwise this method will return an error.
Panics
This method will panic, unless all of the following is true:
address
points to Flash memoryaddress
is aligned to a half-page boundary (16 words, 64 bytes)words
has a length of 16
pub fn check_errors(&self) -> Result<(), Error>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self