Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

numBytes = 0;
while( numBytes < MY_BUFFER_SIZE )
{
// DRV_SPI_Put API returns data in any case, upto the user to use it
DRV_SPI_Put( myChannel, myBuffer[numBytes++] );
// Do something else...
}
Parameters
Parameters Description
channel SPI instance through which the communication needs to
happen
buffer Data byte/word to write to the SPI
Function
void DRV_SPI_Put(uint8_t channel, const uint16_t buffer )
1.3.3.2.4 DRV_SPI_PutBuffer Function
Writes a data buffer to SPI
File
drv_spi.h
Syntax
void DRV_SPI_PutBuffer(uint8_t channel, uint8_t * data, uint16_t count);
Returns
Number of bytes actually written to the SPI
Description
This routine writes a buffered data to SPI.
Remarks
This is a blocking routine.
Preconditions
The DRV_SPI_Initialize routine must have been called for the specified SPI driver instance.
Example
Refer to DRV_SPI_Initialize() for an example
Parameters
Parameters Description
channel SPI instance through which the communication needs to
happen
buffer Buffer containing the data write to the SPI instance
numbytes Total number of bytes that to write to the SPI instance (must
be equal to or less than the size of the buffer)
Function
void DRV_SPI_PutBuffer( uint8_t channel, const uint16_t *buffer, const unsigned int numbytes )
1.3 SPI Driver MLA - Drivers Help Driver Interface
77

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh