Struct sam4l::flashcalw::FLASHCALW  
                   
                       [−]
                   
               [src]
pub struct FLASHCALW {
    registers: *mut FlashcalwRegisters,
    ahb_clock: Clock,
    hramc1_clock: Clock,
    pb_clock: Clock,
    client: Cell<Option<&'static Client<FLASHCALW>>>,
    current_state: Cell<FlashState>,
    buffer: TakeCell<'static, Sam4lPage>,
}Fields
registers: *mut FlashcalwRegisters
                           
                           
                           
                           ahb_clock: Clock
                           
                           
                           
                           hramc1_clock: Clock
                           
                           
                           
                           pb_clock: Clock
                           
                           
                           
                           client: Cell<Option<&'static Client<FLASHCALW>>>
                           
                           
                           
                           current_state: Cell<FlashState>
                           
                           
                           
                           buffer: TakeCell<'static, Sam4lPage>
                           
                    Methods
impl FLASHCALW[src]
const fn new(
    base_addr: usize, 
    ahb_clk: HSBClock, 
    hramc1_clk: HSBClock, 
    pb_clk: PBBClock
) -> FLASHCALW[src]
base_addr: usize,
ahb_clk: HSBClock,
hramc1_clk: HSBClock,
pb_clk: PBBClock
) -> FLASHCALW
fn invalidate_cache(&self)[src]
Cache controlling functionality.
pub fn enable_picocache(&self, enable: bool)[src]
pub fn enable_cache(&self)[src]
Enable HCACHE
pub fn pico_enabled(&self) -> bool[src]
pub fn handle_interrupt(&self)[src]
pub fn get_flash_size(&self) -> u32[src]
FLASH properties.
pub fn get_page_count(&self) -> u32[src]
pub fn get_page_count_per_region(&self) -> u32[src]
pub fn get_page_region(&self, page_number: i32) -> u32[src]
pub fn get_region_first_page_number(&self, region: u32) -> u32[src]
fn set_wait_state(&self, wait_state: u32)[src]
FLASHC Control
fn enable_ws1_read_opt(&mut self, enable: bool)[src]
fn set_flash_waitstate_and_readmode(
    &mut self, 
    cpu_freq: u32, 
    _ps_val: u32, 
    _is_fwu_enabled: bool
)[src]
&mut self,
cpu_freq: u32,
_ps_val: u32,
_is_fwu_enabled: bool
)
pub fn enable_high_speed_flash(&self)[src]
Configure high-speed flash mode. This is taken from the ASF code
pub fn is_ready(&self) -> bool[src]
Flashcalw status
fn is_error(&self) -> bool[src]
fn get_page_number(&self) -> u32[src]
Flashcalw command control
pub fn issue_command(&self, command: FlashCMD, page_number: i32)[src]
pub fn no_operation(&self)[src]
Flashcalw global commands
pub fn erase_all(&self)[src]
pub fn is_page_region_locked(&self, page_number: u32) -> bool[src]
FLASHCALW Protection Mechanisms
pub fn is_region_locked(&self, region: u32) -> bool[src]
pub fn lock_page_region(&self, page_number: i32, lock: bool)[src]
fn clear_page_buffer(&self)[src]
Flashcalw Access to Flash Pages
fn is_page_erased(&self) -> bool[src]
fn flashcalw_erase_page(&self, page_number: i32)[src]
fn flashcalw_write_page(&self, page_number: i32)[src]
fn quick_user_page_read(&self) -> bool[src]
There's a user_page that isn't contiguous with the rest of the flash. Currently it's not being used.
fn erase_user_page(&self, check: bool) -> bool[src]
fn write_user_page(&self)[src]
fn write_to_page_buffer(&self, pg_buff_addr: usize)[src]
impl FLASHCALW[src]
pub fn configure(&mut self)[src]
pub fn get_page_size(&self) -> u32[src]
pub fn get_number_pages(&self) -> u32[src]
pub fn read_range(
    &self, 
    address: usize, 
    size: usize, 
    buffer: &'static mut Sam4lPage
) -> ReturnCode[src]
&self,
address: usize,
size: usize,
buffer: &'static mut Sam4lPage
) -> ReturnCode
pub fn write_page(
    &self, 
    page_num: i32, 
    data: &'static mut Sam4lPage
) -> ReturnCode[src]
&self,
page_num: i32,
data: &'static mut Sam4lPage
) -> ReturnCode
pub fn erase_page(&self, page_num: i32) -> ReturnCode[src]
Trait Implementations
impl<C: Client<Self>> HasClient<'static, C> for FLASHCALW[src]
fn set_client(&self, client: &'static C)[src]
Set the client for this flash peripheral. The client will be called when operations complete. Read more
impl Flash for FLASHCALW[src]
type Page = Sam4lPage
Type of a single flash page for the given implementation.
fn read_page(
    &self, 
    page_number: usize, 
    buf: &'static mut Self::Page
) -> ReturnCode[src]
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
Read a page of flash into the buffer.
fn write_page(
    &self, 
    page_number: usize, 
    buf: &'static mut Self::Page
) -> ReturnCode[src]
&self,
page_number: usize,
buf: &'static mut Self::Page
) -> ReturnCode
Write a page of flash from the buffer.
fn erase_page(&self, page_number: usize) -> ReturnCode[src]
Erase a page of flash.