#include "conf_nf.h"
#include "board.h"
#include "gpio.h"
#include "ecchrs.h"
#include "nf.h"
#include "nf_512B.h"
#include "nf_2KB.h"
Data Structures | |
struct | St_nf_conf |
struct | St_nf_id |
struct | St_nf_link_id_block |
Functions | |
bool | nf_check_status (void) |
Check the status of the selected device. More... | |
U8 | nf_check_type (U8 nb_dev) |
Tests the Nand Flash configuration. More... | |
void | nf_copy_back_conf (U32 page_addr) |
void | nf_copy_back_init (U32 page_addr) |
Prepare a copy-back session. More... | |
U8 | nf_detect (void) |
void | nf_erase_block (U32 page_addr, U8 force_erase) |
Erases a block. More... | |
U8 | nf_get_freq (void) |
returns the frequency supported by the selected NF. More... | |
void | nf_init (U32 hsb_f_hz) |
Initializes the Nand Flash Controller and low level driver. More... | |
void | nf_mark_bad_block (U32 page_addr) |
Mark a block as 'invalid' by clearing it entirely. More... | |
void | nf_open_page_read (U32 page_addr, U16 byte_addr) |
Opens a page for read. More... | |
void | nf_open_page_write (U32 page_addr, U16 byte_addr) |
Opens a page for write. More... | |
void | nf_print_block (U16 block_addr, U8 dev_id) |
void | nf_protect (void) |
Protect all the flashes. More... | |
static __always_inline U8 | nf_rd_data (void) |
Read a data byte from the Nand Flash. More... | |
U32 | nf_read_id (U8 read_id_cmd, U8 nf_num) |
Read the ID of the Nand-Flash. More... | |
void | nf_read_spare_byte (U8 _MEM_TYPE_SLOW_ *p_byte, U8 n_byte, U32 page_addr) |
void | nf_reset_nands (U8 nb_dev) |
Reset all the NF devices. More... | |
static __always_inline void | nf_select (U8 dev) |
Send a command cycle on the last selected Nand Flash. More... | |
static __always_inline void | nf_send_nop (void) |
Ensure that both CLE and ALE are not asserted. More... | |
void | nf_unprotect (void) |
unprotect all the flashes More... | |
void | nf_wait_busy (void) |
Tests the true busy. More... | |
static __always_inline void | nf_wr_addr (U8 addr) |
Send an address cycle on the last selected Nand Flash. More... | |
static __always_inline void | nf_wr_cmd (U8 cmd) |
Send a command cycle on the last selected Nand Flash. More... | |
static __always_inline void | nf_wr_data (U8 data) |
Write a data byte to the Nand Flash. More... | |