simple FS  v0.1.0
Classes | Macros | Typedefs | Enumerations | Functions | Variables
memory_winbond32.h File Reference
#include "memory_driver.h"
#include "simplefs_config.h"
Include dependency graph for memory_winbond32.h:

Go to the source code of this file.

Classes

struct  __winbond_driver_
 

Macros

#define MEMORY_MANUFACTURER_WINBOND   0xEF
 
#define MEMORY_MANUFACTURER_MICRON   0x20
 
#define MEMORY_MANUFACTURER_CYPRESS   0x01
 
#define W_SR   0x01
 
#define PAGE_PGM   0x02
 
#define READ   0x03
 
#define W_DE   0x04
 
#define R_SR1   0x05
 
#define W_EN   0x06
 
#define FAST_READ   0x0b
 
#define SECTOR_E   0x20
 
#define QPAGE_PGM   0x32
 
#define READ_DSPI   0x3B
 
#define R_SR2   0x35
 
#define R_UNIQUE_ID   0x4b
 
#define W_SR_ENABLE   0x50
 
#define CHIP_ERASE2   0x60
 
#define BLK_E_32K   0x52
 
#define E_SUSPEND   0x75
 
#define E_RESUME   0x7a
 
#define R_MANUF_ID   0x90
 
#define R_JEDEC_ID   0x9f
 
#define HIGH_PERF_M   0xa3
 
#define RELEASE   0xab
 
#define PDWN   0xb9
 
#define CHIP_ERASE   0xc7
 
#define BLK_E_64K   0xD8
 
#define CONT_R_RST   0xff
 
#define SR1_BUSY_MASK   0x01
 
#define SR1_WEN_MASK   0x02
 
#define WINBOND_MANUF   0xef
 
#define DEFAULT_TIMEOUT   200
 
#define WINBOND_32_PAGE   256
 
#define WINBOND_32_SECTOR_SIZE   WINBOND_32_PAGE*16
 WINBOND_32_SECTOR = 4096.
 
#define WINBOND_32_SECTOR_COUNT   1024
 

Typedefs

typedef enum __winbond_status_mem_ Winbond_memoryStatus
 
typedef struct __winbond_driver_ WindBondDriver_TypeDef
 

Enumerations

enum  __winbond_status_mem_ { MEMORY_EMPTY =0, MEMORY_NOT_EMPTY, MEMORY_BUSY, MEMORY_ERROR }
 

Functions

uint8_t winbond_init (void *hw_object)
 end IO functions More...
 
uint8_t winbond_init (void *hspi, void *GPIOx, uint16_t GPIO_Pin)
 
uint8_t winbond_isBusy (void)
 
uint16_t winbond_readSR (void)
 
uint8_t winbond_readManufacturer (void)
 
uint64_t winbond_readUniqueID ()
 
uint8_t winbond_readMemoryType (void)
 
uint8_t winbond_readCapacity (void)
 
uint16_t winbond_read (uint32_t addr, uint8_t *buf, uint16_t n)
 
uint16_t winbond_read_DMA (uint32_t addr, uint8_t *buf, uint16_t n)
 
uint16_t winbond_write (uint32_t addr, uint8_t *buf, int32_t n)
 
uint8_t winbond_powerDown (void)
 
uint8_t winbond_powerUp (void)
 
uint8_t winbond_eraseSector (uint32_t addr_start)
 
uint8_t winbond_eraseAll (void)
 
Winbond_memoryStatus winbond_checkSector (uint16_t sector_index)
 
uint8_t winbond_writeToMemory (uint32_t address, uint8_t *buf, uint16_t n)
 
uint8_t * winbond_readChipInfo (void)
 
void winbond_dump (void)
 
uint8_t winbond_dma_cmplt ()
 
uint8_t winbond_dma_half ()
 

Variables

MemoryDriver_t memorySpi
 

Detailed Description

Date
20.12.2020
Author
Juraj Dudak