remove anyhow

This commit is contained in:
2025-09-22 01:49:25 +02:00
parent c94f5bdb45
commit 1791f463b7
21 changed files with 2268 additions and 1982 deletions

View File

@@ -1,4 +1,5 @@
use crate::hal::Box;
use crate::FatError::FatResult;
use alloc::vec::Vec;
use async_trait::async_trait;
use chrono::{DateTime, Utc};
@@ -24,11 +25,11 @@ use chrono::{DateTime, Utc};
//
#[async_trait]
pub trait RTCModuleInteraction {
async fn get_backup_info(&mut self) -> anyhow::Result<BackupHeader>;
async fn get_backup_config(&mut self) -> anyhow::Result<Vec<u8>>;
async fn backup_config(&mut self, bytes: &[u8]) -> anyhow::Result<()>;
async fn get_rtc_time(&mut self) -> anyhow::Result<DateTime<Utc>>;
async fn set_rtc_time(&mut self, time: &DateTime<Utc>) -> anyhow::Result<()>;
async fn get_backup_info(&mut self) -> FatResult<BackupHeader>;
async fn get_backup_config(&mut self) -> FatResult<Vec<u8>>;
async fn backup_config(&mut self, bytes: &[u8]) -> FatResult<()>;
async fn get_rtc_time(&mut self) -> FatResult<DateTime<Utc>>;
async fn set_rtc_time(&mut self, time: &DateTime<Utc>) -> FatResult<()>;
}
//
// const BACKUP_HEADER_MAX_SIZE: usize = 64;