3#ifndef __SYS_SPI_NAND_H__
4#define __SYS_SPI_NAND_H__
u32_t uint32_t
Definition stdint.h:13
u8_t uint8_t
Definition stdint.h:7
u16_t uint16_t
Definition stdint.h:10
Represents the NAND Device ID structure.
Definition sys-spi-nand.h:26
uint8_t dlen
Length of the ID (in bytes).
Definition sys-spi-nand.h:29
uint16_t dev
Device ID (16-bits) for identifying the specific NAND device.
Definition sys-spi-nand.h:28
uint8_t mfr
Manufacturer ID byte.
Definition sys-spi-nand.h:27
Represents the specific information of a NAND Flash device.
Definition sys-spi-nand.h:35
uint32_t planes_per_die
Number of planes present on a single die.
Definition sys-spi-nand.h:42
spi_nand_id_t id
Unique identifier for the NAND Flash device, containing manufacturer and device ID.
Definition sys-spi-nand.h:37
uint32_t pages_per_block
Number of pages contained in a single block.
Definition sys-spi-nand.h:40
uint32_t ndies
Total number of dies in the NAND package.
Definition sys-spi-nand.h:43
char * name
Name of the NAND Flash device.
Definition sys-spi-nand.h:36
uint32_t blocks_per_die
Number of blocks present on a single die.
Definition sys-spi-nand.h:41
spi_io_mode_t mode
I/O mode used for communication (assumes the existence of a spi_io_mode_t type).
Definition sys-spi-nand.h:44
uint32_t page_size
Size of the data page (in bytes).
Definition sys-spi-nand.h:38
uint32_t spare_size
Size of the spare area for additional information (in bytes).
Definition sys-spi-nand.h:39
SPI Device Configuration Structure.
Definition sys-spi.h:92
int spi_nand_detect(sunxi_spi_t *spi)
Detect and initialize SPI NAND flash.
Definition sys-spi-nand.c:342
uint32_t spi_nand_read(sunxi_spi_t *spi, uint8_t *buf, uint32_t addr, uint32_t rxlen)
Read data from SPI NAND flash.
Definition sys-spi-nand.c:415
spi_io_mode_t
SPI Input/Output Mode Enumeration.
Definition sys-spi.h:30