mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-05 11:15:07 +01:00
31 lines
686 B
C
31 lines
686 B
C
#ifndef __NAND_H__
|
|
#define __NAND_H__
|
|
|
|
#include "types.h"
|
|
#include "ipc.h"
|
|
|
|
void nand_irq(void);
|
|
|
|
void nand_send_command(u32 command, u32 bitmask, u32 flags, u32 num_bytes);
|
|
int nand_reset(void);
|
|
void nand_get_id(u8 *);
|
|
void nand_get_status(u8 *);
|
|
void nand_read_page(u32 pageno, void *data, void *ecc);
|
|
void nand_write_page(u32 pageno, void *data, void *ecc);
|
|
void nand_erase_block(u32 pageno);
|
|
void nand_wait(void);
|
|
|
|
void nand_read_cluster(u32 clusterno, void *data);
|
|
|
|
#define NAND_ECC_OK 0
|
|
#define NAND_ECC_CORRECTED 1
|
|
#define NAND_ECC_UNCORRECTABLE -1
|
|
|
|
int nand_correct(u32 pageno, void *data, void *ecc);
|
|
|
|
void nand_initialize();
|
|
|
|
void nand_ipc(volatile ipc_request *req);
|
|
|
|
#endif
|