@@ -11,7 +11,7 @@ pub trait ReadNorFlash {
1111 ///
1212 /// This should throw an error in case `bytes.len()` will be larger than
1313 /// the peripheral end address.
14- fn try_read ( & mut self , offset : u32 , bytes : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > ;
14+ fn read ( & mut self , offset : u32 , bytes : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > ;
1515
1616 /// The capacity of the peripheral in bytes.
1717 fn capacity ( & self ) -> usize ;
@@ -32,13 +32,13 @@ pub trait NorFlash: ReadNorFlash {
3232 /// erase resolution
3333 /// If power is lost during erase, contents of the page are undefined.
3434 /// `from` and `to` must both be multiples of `ERASE_SIZE` and `from` <= `to`.
35- fn try_erase ( & mut self , from : u32 , to : u32 ) -> Result < ( ) , Self :: Error > ;
35+ fn erase ( & mut self , from : u32 , to : u32 ) -> Result < ( ) , Self :: Error > ;
3636
3737 /// If power is lost during write, the contents of the written words are undefined,
3838 /// but the rest of the page is guaranteed to be unchanged.
3939 /// It is not allowed to write to the same word twice.
4040 /// `offset` and `bytes.len()` must both be multiples of `WRITE_SIZE`.
41- fn try_write ( & mut self , offset : u32 , bytes : & [ u8 ] ) -> Result < ( ) , Self :: Error > ;
41+ fn write ( & mut self , offset : u32 , bytes : & [ u8 ] ) -> Result < ( ) , Self :: Error > ;
4242}
4343
4444/// Marker trait for NorFlash relaxing the restrictions on `write`.
0 commit comments