Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5b1da20

Browse files
committedDec 22, 2024·
Implement at least ErrorType for the new loader
1 parent 6b14a46 commit 5b1da20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/ota.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl EspFirmwareInfoLoad {
160160
///
161161
/// Returns `true` if the information was successfully fetched.
162162
/// Returns `false` if the firmware data has not been loaded completely yet.
163-
pub fn fetch(&self, data: &[u8], info: &mut FirmwareInfo) -> Result<bool, EspError> {
163+
pub fn fetch(&self, data: &[u8], info: &mut FirmwareInfo) -> Result<bool, EspIOError> {
164164
let loaded = data.len()
165165
>= mem::size_of::<esp_image_header_t>()
166166
+ mem::size_of::<esp_image_segment_header_t>()
@@ -227,6 +227,10 @@ impl EspFirmwareInfoLoad {
227227
}
228228
}
229229

230+
impl io::ErrorType for EspFirmwareInfoLoad {
231+
type Error = EspIOError;
232+
}
233+
230234
#[derive(Debug)]
231235
pub struct EspOtaUpdate<'a> {
232236
update_partition: *const esp_partition_t,

0 commit comments

Comments
 (0)
Please sign in to comment.