Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Remarks
This is blocking routine.
Preconditions
The DRV_SPI_Initialize routine must have been called.
Example
uint16_t myBuffer[MY_BUFFER_SIZE];
unsigned int total;
uint8_t myChannel = 2;
total = 0;
do
{
total += DRV_SPI_GetBuffer( myChannel, &myBuffer[total], MY_BUFFER_SIZE - total);
// Do something else...
} while( total < MY_BUFFER_SIZE );
Parameters
Parameters Description
channel SPI instance through which the communication needs to
happen
buffer Buffer into which the data read from the SPI instance will be
placed.
numbytes Total number of bytes that need to be read from the module
instance (must be equal to or less than the size of the buffer)
Function
unsigned int DRV_SPI_GetBuffer ( uint8_t channel, uint16_t *buffer, unsigned int numbytes )
1.3.3.2.3 DRV_SPI_Put Function
Writes a byte/word of data to the SPI to the specified channel
File
drv_spi.h
Syntax
void DRV_SPI_Put(uint8_t channel, uint8_t data);
Returns
None.
Description
This routine writes a byte/word of data to the SPI to the specified channel
Remarks
This is blocking routine.
Preconditions
The DRV_SPI_Initialize routine must have been called for the specified SPI driver instance.
Example
uint16_t myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
uint8_t myChannel = 2;
// Pre-initialize myBuffer with MY_BUFFER_SIZE bytes of valid data.
1.3 SPI Driver MLA - Drivers Help Driver Interface
76
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_driver.pdf