Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Remarks
This routine must be called before any other SPI routine is called. This routine should only be called once during system
initialization.
Preconditions
None.
Example
uint16_t myBuffer[MY_BUFFER_SIZE];
unsigned int total;
uint8_t myChannel = 2;
DRV_SPI_INIT_DATA spiInitData = {2, 3, 7, 0, SPI_BUS_MODE_3, 0};
DRV_SPI_Initialize(&spiInitData);
DRV_SPI_Lock(myChannel);
total = 0;
do
{
total += DRV_SPI_PutBuffer( myChannel, &myBuffer[total], MY_BUFFER_SIZE - total );
// Do something else...
} while( total < MY_BUFFER_SIZE );
Parameters
Parameters Description
pData SPI initialization structure.
Function
void DRV_SPI_Initialize ( DRV_SPI_INIT_DATA *pData)
1.3.3.1.3 DRV_SPI_Lock Function
Locks the SPI instance specified using the channel parameter
File
drv_spi.h
Syntax
int DRV_SPI_Lock(uint8_t channel);
Returns
Returns the status of the driver usage.
Description
This routine locks the SPI driver instance specified using the channel parameter
Remarks
None.
Preconditions
None.
Example
Refer to DRV_SPI_Initialize() for an example
1.3 SPI Driver MLA - Drivers Help Driver Interface
73
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_driver.pdf