AT26_SendCommand
Default mainpageat91libmemoriesspi-flashAT26_SendCommand
Description Source Call Graph
AT26_SendCommand
Sends a command to the serial flash through the SPI.
 
Syntax / parameters
unsigned char AT26_SendCommand (At26 *pAt26, unsigned char cmd, unsigned char cmdSize, unsigned char *pData, unsigned int dataSize, unsigned int address, SpidCallback callback, void *pArgument)

Name Type Default Description
pAt26 At26 *
  Pointer to an At26 driver instance.
cmd unsigned char
  Command byte.
cmdSize unsigned char
  Size of command (command byte + address bytes + dummy bytes).
pData unsigned char *
  Data buffer.
dataSize unsigned int
  Number of bytes to send/receive.
address unsigned int
  Address to transmit.
callback SpidCallback
  Optional user-provided callback to invoke at end of transfer.
pArgument void *
  Optional argument to the callback function.
 
Return value unsigned char
   
Description
Sends a command to the serial flash through the SPI.
The command is made up of two parts: the first is used to transmit the command byte and optionally, address and dummy bytes. The second part is the data to send or receive. This function does not block: it returns as soon as the transfer has been started. An optional callback can be invoked to notify the end of transfer. Return 0 if successful; otherwise, returns AT26_ERROR_BUSY if the AT26 driver is currently executing a command, or AT26_ERROR_SPI if the command cannot be sent because of a SPI error.
 
Source
The documentation for this Member was generated from the following files:
  • at26.c