Marco Hsu / WIFI_API_32kRAM
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers spi_flash.h Source File

spi_flash.h

00001  /* 
00002  *  Generated for windbond flash
00003  */
00004 
00005 #ifndef SPI_FLASH_H
00006 #define SPI_FLASH_H
00007 
00008 #include <stdbool.h>
00009 #include <stdint.h>
00010 
00011 
00012 #if 1 //marcus
00013 
00014 //#if !defined(TARGET_DELTA_DFCM_NNN40)
00015 bool spi_flash_init(void);
00016 bool spi_flash_powerDown(void);
00017 //#endif
00018 
00019 void spi_flash_erase(void);
00020 void spi_flash_readpage(uint32_t address, uint8_t *data, uint16_t len);
00021 void spi_flash_write(void);
00022 
00023 void spi_flash_eraseCmd(uint8_t command, uint32_t address);
00024 void spi_flash_writePage(uint32_t address, const uint8_t *data, uint16_t len);
00025 
00026 bool spi_flash_waitBusy(void);
00027 void spi_flash_setWEL(void);
00028 
00029 // added by Tsungta
00030 void spi_flash_read_uniqueID(uint8_t *data);
00031 void spi_flash_erase_security(uint32_t address);
00032 void spi_flash_writePage_security(uint32_t address, const uint8_t *data, uint16_t len);
00033 void spi_flash_read_security(uint32_t address, uint8_t *data, uint16_t len);
00034 #endif
00035 #endif /* SPI_MASTER_H */