File nut/dev/spi_flash_at45d.c

References Functions: SpiAt45dFlashCheck() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCommit() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCompare() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCopy() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashErase() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashExit() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashInit() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashRead() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashUsed() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashWrite() nut/dev/spi_flash_at45d.c

Included Files


Preprocessor definitions

#define FLASH_BUFFERS_AT45D 2

#define AT45D_CRC_SIZE 0

#define FLASH_BUFFER_DIRTY 0x0001

#define FLASH_MOUNT_OFFSET_AT45D0 0

#define FLASH_MOUNT_TOP_RESERVE_AT45D0 1

#define FLASH_MOUNT_OFFSET_AT45D1 0

#define FLASH_MOUNT_TOP_RESERVE_AT45D1 1

#define FLASH_MOUNT_OFFSET_AT45D2 0

#define FLASH_MOUNT_TOP_RESERVE_AT45D2 1

#define FLASH_MOUNT_OFFSET_AT45D3 0

#define FLASH_MOUNT_TOP_RESERVE_AT45D3 1


Typedef AT45D_FLASH

typedef struct _AT45D_FLASH AT45D_FLASH
struct _AT45D_FLASH  
   {  
      sf_unit_t dxb_page[2];  
      uint_fast8_t flags[2];  
      int dxb_locks[2];  
      HANDLE dxb_lque;  
      uint_fast8_t dxb_pshft;  
      uint8_t* dxb_pbuf[2];  
   }  

Global Variable flashAt45d0

NUTSERIALFLASH flashAt45d0
Visible in:   nut/dev/spi_flash_at45d.c

Global Variable flashAt45d1

NUTSERIALFLASH flashAt45d1
Visible in:   nut/dev/spi_flash_at45d.c

Global Variable flashAt45d2

NUTSERIALFLASH flashAt45d2
Visible in:   nut/dev/spi_flash_at45d.c

Global Variable flashAt45d3

NUTSERIALFLASH flashAt45d3
Visible in:   nut/dev/spi_flash_at45d.c

Local Function At45dFlashLoadUnit()

static int_fast8_t At45dFlashLoadUnit ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int_fast8_t lock )
Calls: At45dFlashRelease() nut/dev/spi_flash_at45d.c
  At45dFlashSaveUnit() nut/dev/spi_flash_at45d.c
  At45dNodeLock(), At45dNodeTransfer(), At45dNodeUnlock(), NutEventWait()
Called by: SpiAt45dFlashCompare() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCopy() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashRead() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashUsed() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashWrite() nut/dev/spi_flash_at45d.c

Local Function At45dFlashRelease()

static void At45dFlashRelease ( NUTSERIALFLASH* sfi, int b )
Calls: NutEventPost()
Called by: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCopy() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashWrite() nut/dev/spi_flash_at45d.c

Local Function At45dFlashSaveUnit()

static int At45dFlashSaveUnit ( NUTSERIALFLASH* sfi, int_fast8_t b )
Calls: At45dNodeCommand(), At45dNodeLock(), At45dNodeTransfer(), At45dNodeUnlock(), At45dNodeWaitReady()
Called by: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  SpiAt45dFlashCommit() nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashCheck()

static int SpiAt45dFlashCheck ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int cnt )
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashCommit()

static int SpiAt45dFlashCommit ( NUTSERIALFLASH* sfi, sf_unit_t pgn )
Calls: At45dFlashSaveUnit() nut/dev/spi_flash_at45d.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashCompare()

static int SpiAt45dFlashCompare ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, const void* data, int len )
Calls: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  memcmp() nut/c/string/memcmp.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashCopy()

static int SpiAt45dFlashCopy ( NUTSERIALFLASH* sfi, sf_unit_t spg, sf_unit_t dpg )
Calls: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  At45dFlashRelease() nut/dev/spi_flash_at45d.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashErase()

static int SpiAt45dFlashErase ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int cnt )
Calls: At45dNodeCommand(), At45dNodeLock(), At45dNodeUnlock(), At45dNodeWaitReady()
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashExit()

static void SpiAt45dFlashExit ( NUTSERIALFLASH* sfi )
Calls: free() nut/crt/malloc.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashInit()

static int SpiAt45dFlashInit ( NUTSERIALFLASH* sfi )
Calls: malloc() nut/crt/malloc.c
  At45dNodeProbe(), calloc()
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashRead()

static int SpiAt45dFlashRead ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, void* data, int len )
Calls: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  memcpy() nut/c/string/memcpy.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashUsed()

static int SpiAt45dFlashUsed ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int skip )
Calls: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
Used in:   nut/dev/spi_flash_at45d.c

Local Function SpiAt45dFlashWrite()

static int SpiAt45dFlashWrite ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, const void* data, int len )
Calls: At45dFlashLoadUnit() nut/dev/spi_flash_at45d.c
  At45dFlashRelease() nut/dev/spi_flash_at45d.c
  memcpy() nut/c/string/memcpy.c
Used in:   nut/dev/spi_flash_at45d.c