@@ -5,7 +5,7 @@ use std::{
55 path:: PathBuf ,
66} ;
77
8- use generic_array:: typenum:: { U16 , U512 } ;
8+ use generic_array:: typenum:: { U512 , U8 } ;
99use littlefs2:: { const_ram_storage, driver:: Storage , fs:: Allocation } ;
1010
1111use crate :: {
@@ -53,15 +53,9 @@ impl Storage for FilesystemStorage {
5353 const BLOCK_CYCLES : isize = -1 ;
5454
5555 type CACHE_SIZE = U512 ;
56- type LOOKAHEADWORDS_SIZE = U16 ;
57- // TODO: This can't actually be changed currently
58- // type FILENAME_MAX_PLUS_ONE = U256;
59- // type PATH_MAX_PLUS_ONE = U256;
60- // const FILEBYTES_MAX: usize = littlefs2::ll::LFS_FILE_MAX as _;
61- // TODO: This can't actually be changed currently
62- // type ATTRBYTES_MAX = U1022;
63-
64- fn read ( & self , offset : usize , buffer : & mut [ u8 ] ) -> LfsResult < usize > {
56+ type LOOKAHEAD_SIZE = U8 ;
57+
58+ fn read ( & mut self , offset : usize , buffer : & mut [ u8 ] ) -> LfsResult < usize > {
6559 debug ! ( "read: offset: {}, len: {}" , offset, buffer. len( ) ) ;
6660 let mut file = File :: open ( & self . 0 ) . unwrap ( ) ;
6761 file. seek ( SeekFrom :: Start ( offset as _ ) ) . unwrap ( ) ;
0 commit comments