2022-11-26 18:54:29 +01:00
|
|
|
#ifndef WRITEBACK_H__
|
|
|
|
#define WRITEBACK_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
2024-01-29 14:23:18 +01:00
|
|
|
#define WRITEBACK_SECTOR_TABLE_SIZE (1024)
|
2023-01-06 23:47:00 +01:00
|
|
|
|
|
|
|
|
2023-04-04 20:25:58 +02:00
|
|
|
typedef enum {
|
|
|
|
WRITEBACK_SD,
|
|
|
|
WRITEBACK_USB,
|
|
|
|
} writeback_mode_t;
|
|
|
|
|
|
|
|
|
2023-01-06 23:47:00 +01:00
|
|
|
void writeback_load_sector_table (uint32_t address);
|
2024-01-29 14:23:18 +01:00
|
|
|
|
2023-04-04 20:25:58 +02:00
|
|
|
void writeback_enable (writeback_mode_t mode);
|
2023-01-06 23:47:00 +01:00
|
|
|
void writeback_disable (void);
|
2023-06-30 01:09:02 +02:00
|
|
|
bool writeback_pending (void);
|
2024-01-29 14:23:18 +01:00
|
|
|
|
2022-11-26 18:54:29 +01:00
|
|
|
void writeback_init (void);
|
2024-01-29 14:23:18 +01:00
|
|
|
|
2022-11-26 18:54:29 +01:00
|
|
|
void writeback_process (void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|