possibilité d'écrire et de lire plusieurs secteurs d'un coup
This commit is contained in:
@ -38,6 +38,34 @@ impl DrvDisk {
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
/// read inside the disk
|
||||
///
|
||||
/// ### Parameters
|
||||
///
|
||||
/// - **self** driver disk
|
||||
/// - **sector_number** sector where to read the data
|
||||
/// - **data** where the readed data will be stored
|
||||
pub fn read_multiple_sector(&mut self, sector_number: i32, data: &mut [u8]) {
|
||||
match Disk::read_multiple_request(&mut self.disk, sector_number, data) {
|
||||
Err(e) => println!("{:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
/// write inside the disk
|
||||
///
|
||||
/// ### Parameters
|
||||
///
|
||||
/// - **self** driver disk
|
||||
/// - **sector_number** sector where to write the data
|
||||
/// - **data** where the data to write is stored
|
||||
pub fn write_multiple_sector(&mut self, sector_number: i32, data: &[u8]) {
|
||||
match Disk::write_multiple_request(&mut self.disk, sector_number, data) {
|
||||
Err(e) => println!("{:?}", e),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user