File nut/dev/spi_at45dib.c

References Functions: SpiAt45dibCheck() nut/dev/spi_at45dib.c
  SpiAt45dibCommit() nut/dev/spi_at45dib.c
  SpiAt45dibCompare() nut/dev/spi_at45dib.c
  SpiAt45dibCopy() nut/dev/spi_at45dib.c
  SpiAt45dibErase() nut/dev/spi_at45dib.c
  SpiAt45dibExit() nut/dev/spi_at45dib.c
  SpiAt45dibInit() nut/dev/spi_at45dib.c
  SpiAt45dibRead() nut/dev/spi_at45dib.c
  SpiAt45dibUsed() nut/dev/spi_at45dib.c
  SpiAt45dibWrite() nut/dev/spi_at45dib.c
References Variables: spiNode0 nut/dev/spi_at45dib.c
  spiNode1 nut/dev/spi_at45dib.c

Included Files


Preprocessor definitions

#define DFCMD_BUF1_LOAD_PAGE 0x53

#define DFCMD_BUF2_LOAD_PAGE 0x55

#define AT45DIB_FDIRTY 0x0001

#define SPI_RATE_AT45D0 33000000

#define SPI_MODE_AT45D0 SPI_MODE_3

#define MOUNT_OFFSET_AT45DIB0 0

#define MOUNT_TOP_RESERVE_AT45DIB0 1

#define SPI_RATE_AT45D1 33000000

#define SPI_MODE_AT45D1 SPI_MODE_3

#define MOUNT_OFFSET_AT45DIB1 0

#define MOUNT_TOP_RESERVE_AT45DIB1 1


Typedef AT45DIB

typedef struct _AT45DIB AT45DIB
struct _AT45DIB  
   {  
      sf_unit_t dib_page[2];  
      uint_fast8_t flags[2];  
      int dib_locks[2];  
      HANDLE dib_lque;  
      uint_fast8_t dib_pshft;  
   }  

Global Variable flashAt45dib0

NUTSERIALFLASH flashAt45dib0
Visible in:   nut/dev/spi_at45dib.c

Global Variable flashAt45dib1

NUTSERIALFLASH flashAt45dib1
Visible in:   nut/dev/spi_at45dib.c

Local Variables

spiNode0
static NUTSPINODE spiNode0
Used in:   nut/dev/spi_at45dib.c

spiNode1
static NUTSPINODE spiNode1

Used in:   nut/dev/spi_at45dib.c

Local Function At45dibAllocate()

static int_fast8_t At45dibAllocate ( NUTSERIALFLASH* sfi, sf_unit_t pgn )
Calls: At45dibCommand() nut/dev/spi_at45dib.c
  At45dibFlash() nut/dev/spi_at45dib.c
  At45dibRelease() nut/dev/spi_at45dib.c
  At45dibWaitReady() nut/dev/spi_at45dib.c
  NutEventWait()
Called by: SpiAt45dibCopy() nut/dev/spi_at45dib.c
  SpiAt45dibWrite() nut/dev/spi_at45dib.c

Local Function At45dibCommand()

static int At45dibCommand ( NUTSPINODE* node, uint8_t op, uint32_t parm, uint_fast8_t oplen )
Calls: At45dibTransfer() nut/dev/spi_at45dib.c
Called by: At45dibAllocate() nut/dev/spi_at45dib.c
  At45dibFlash() nut/dev/spi_at45dib.c
  SpiAt45dibErase() nut/dev/spi_at45dib.c

Local Function At45dibCompare()

static int At45dibCompare ( NUTSPINODE* node, uint8_t op, uint32_t parm, uint_fast8_t oplen, const void* buf, int xlen )
Calls: At45dibTransmitCmd() nut/dev/spi_at45dib.c
Called by: SpiAt45dibCompare() nut/dev/spi_at45dib.c

Local Function At45dibFlash()

static int At45dibFlash ( NUTSERIALFLASH* sfi, int_fast8_t b )
Calls: At45dibCommand() nut/dev/spi_at45dib.c
  At45dibWaitReady() nut/dev/spi_at45dib.c
Called by: At45dibAllocate() nut/dev/spi_at45dib.c
  SpiAt45dibCommit() nut/dev/spi_at45dib.c

Local Function At45dibRelease()

static void At45dibRelease ( NUTSERIALFLASH* sfi, int b )
Calls: NutEventPost()
Called by: At45dibAllocate() nut/dev/spi_at45dib.c
  SpiAt45dibCopy() nut/dev/spi_at45dib.c
  SpiAt45dibWrite() nut/dev/spi_at45dib.c

Local Function At45dibStatus()

static uint8_t At45dibStatus ( NUTSPINODE* node )
Called by: At45dibWaitReady() nut/dev/spi_at45dib.c
  SpiAt45dibInit() nut/dev/spi_at45dib.c

Local Function At45dibTransfer()

static int At45dibTransfer ( NUTSPINODE* node, uint8_t op, uint32_t parm, uint_fast8_t oplen, const void* txbuf, void* rxbuf, int xlen )
Calls: At45dibTransmitCmd() nut/dev/spi_at45dib.c
Called by: At45dibCommand() nut/dev/spi_at45dib.c
  SpiAt45dibRead() nut/dev/spi_at45dib.c
  SpiAt45dibWrite() nut/dev/spi_at45dib.c

Local Function At45dibTransmitCmd()

static int At45dibTransmitCmd ( NUTSPINODE* node, uint8_t op, uint32_t parm, uint_fast8_t oplen )
Called by: At45dibCompare() nut/dev/spi_at45dib.c
  At45dibTransfer() nut/dev/spi_at45dib.c
  At45dibUsed() nut/dev/spi_at45dib.c

Local Function At45dibUsed()

static int At45dibUsed ( NUTSPINODE* node, uint8_t op, uint32_t parm, uint_fast8_t oplen, int xlen )
Calls: At45dibTransmitCmd() nut/dev/spi_at45dib.c
Called by: SpiAt45dibUsed() nut/dev/spi_at45dib.c

Local Function At45dibWaitReady()

static int At45dibWaitReady ( NUTSPINODE* node, uint32_t tmo )
Calls: At45dibStatus() nut/dev/spi_at45dib.c
Called by: At45dibAllocate() nut/dev/spi_at45dib.c
  At45dibFlash() nut/dev/spi_at45dib.c
  SpiAt45dibErase() nut/dev/spi_at45dib.c

Local Function SpiAt45dibCheck()

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

Local Function SpiAt45dibCommit()

static int SpiAt45dibCommit ( NUTSERIALFLASH* sfi, sf_unit_t pgn )
Calls: At45dibFlash() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibCompare()

static int SpiAt45dibCompare ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, const void* data, int len )
Calls: At45dibCompare() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibCopy()

static int SpiAt45dibCopy ( NUTSERIALFLASH* sfi, sf_unit_t spg, sf_unit_t dpg )
Calls: At45dibAllocate() nut/dev/spi_at45dib.c
  At45dibRelease() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibErase()

static int SpiAt45dibErase ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int cnt )
Calls: At45dibCommand() nut/dev/spi_at45dib.c
  At45dibWaitReady() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibExit()

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

Local Function SpiAt45dibInit()

static int SpiAt45dibInit ( NUTSERIALFLASH* sfi )
Calls: At45dibStatus() nut/dev/spi_at45dib.c
  calloc()
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibRead()

static int SpiAt45dibRead ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, void* data, int len )
Calls: At45dibTransfer() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibUsed()

static int SpiAt45dibUsed ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int skip )
Calls: At45dibUsed() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c

Local Function SpiAt45dibWrite()

static int SpiAt45dibWrite ( NUTSERIALFLASH* sfi, sf_unit_t pgn, int off, const void* data, int len )
Calls: At45dibAllocate() nut/dev/spi_at45dib.c
  At45dibRelease() nut/dev/spi_at45dib.c
  At45dibTransfer() nut/dev/spi_at45dib.c
Used in:   nut/dev/spi_at45dib.c