@@ -11,7 +11,7 @@ pub trait ReadNorFlash {
11
11
///
12
12
/// This should throw an error in case `bytes.len()` will be larger than
13
13
/// 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 > ;
15
15
16
16
/// The capacity of the peripheral in bytes.
17
17
fn capacity ( & self ) -> usize ;
@@ -32,13 +32,13 @@ pub trait NorFlash: ReadNorFlash {
32
32
/// erase resolution
33
33
/// If power is lost during erase, contents of the page are undefined.
34
34
/// `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 > ;
36
36
37
37
/// If power is lost during write, the contents of the written words are undefined,
38
38
/// but the rest of the page is guaranteed to be unchanged.
39
39
/// It is not allowed to write to the same word twice.
40
40
/// `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 > ;
42
42
}
43
43
44
44
/// Marker trait for NorFlash relaxing the restrictions on `write`.
0 commit comments