Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
1.3.3.2.1 DRV_SPI_Get Function
Reads a byte/word of data from SPI from the specified channel
File
drv_spi.h
Syntax
uint8_t DRV_SPI_Get(uint8_t channel);
Returns
A data byte received by the driver.
Description
This routine reads a byte/word of data from SPI from 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
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
uint8_t myChannel = 2;
numBytes = 0;
do
{
myBuffer[numBytes++] = DRV_SPI_Get(myChannel);
// Do something else...
} while( numBytes < MY_BUFFER_SIZE);
Parameters
Parameters Description
channel SPI instance through which the communication needs to
happen
Function
uint16_t DRV_SPI_Get( uint8_t channel)
1.3.3.2.2 DRV_SPI_GetBuffer Function
Reads a buffered data from SPI
File
drv_spi.h
Syntax
void DRV_SPI_GetBuffer(uint8_t channel, uint8_t * data, uint16_t count);
Returns
Number of bytes actually read from the read buffer.
Description
This routine reads a buffered data from the SPI.
1.3 SPI Driver MLA - Drivers Help Driver Interface
75
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_driver.pdf