pub struct Flash { /* private fields */ }
Implementations§
Source§impl Flash
impl Flash
pub fn new() -> Flash
pub fn is_locked(&self) -> bool
pub fn unlock(&self)
pub fn lock(&self)
pub fn unlock_option(&self)
pub fn lock_option(&self)
Sourcepub fn load_option(&self)
pub fn load_option(&self)
Forces option byte reloading. Also generates a system reset.
pub fn handle_interrupt(&self)
pub fn program_halfword(&self)
pub fn erase_page(&self, page_number: usize) -> Result<(), ErrorCode>
pub fn erase_all(&self) -> Result<(), ErrorCode>
pub fn write_page( &self, page_number: usize, buffer: &'static mut StmF303Page, ) -> Result<(), (ErrorCode, &'static mut StmF303Page)>
pub fn read_page( &self, page_number: usize, buffer: &'static mut StmF303Page, ) -> Result<(), (ErrorCode, &'static mut StmF303Page)>
Sourcepub fn write_option(
&self,
byte_number: usize,
value: u8,
) -> Result<(), ErrorCode>
pub fn write_option( &self, byte_number: usize, value: u8, ) -> Result<(), ErrorCode>
Allows programming the 8 option bytes: 0: RDP, 1: USER, 2: DATA0, 3:DATA1, 4. WRP0, 5: WRP1, 6.WRP2, 7. WRP3
pub fn erase_option(&self) -> Result<(), ErrorCode>
Trait Implementations§
Source§impl DeferredCallClient for Flash
impl DeferredCallClient for Flash
Source§impl Flash for Flash
impl Flash for Flash
Source§type Page = StmF303Page
type Page = StmF303Page
Type of a single flash page for the given implementation.
Source§fn read_page(
&self,
page_number: usize,
buf: &'static mut Self::Page,
) -> Result<(), (ErrorCode, &'static mut Self::Page)>
fn read_page( &self, page_number: usize, buf: &'static mut Self::Page, ) -> Result<(), (ErrorCode, &'static mut Self::Page)>
Read a page of flash into the buffer.
Source§impl<C: Client<Self>> HasClient<'static, C> for Flash
impl<C: Client<Self>> HasClient<'static, C> for Flash
Source§fn set_client(&self, client: &'static C)
fn set_client(&self, client: &'static C)
Set the client for this flash peripheral. The client will be called
when operations complete.
Auto Trait Implementations§
impl !Freeze for Flash
impl !RefUnwindSafe for Flash
impl !Send for Flash
impl !Sync for Flash
impl Unpin for Flash
impl !UnwindSafe for Flash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more