Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Syntax
uint8_t DRV_UART1_ReadByte();
Returns
A data byte received by the driver.
Description
This routine reads a byte of data from the UART1.
Preconditions
DRV_UART1_InitializerDefault function should have been called before calling this function. The transfer status should be
checked to see if the receiver is not empty before calling this function.
Example
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
numBytes = 0;
do
{
if( DRV_UART1_TRANSFER_STATUS_RX_DATA_PRESENT & DRV_UART1_TransferStatus() )
{
myBuffer[numBytes++] = DRV_UART1_ReadByte();
}
// Do something else...
} while( numBytes < MY_BUFFER_SIZE);
Function
uint8_t DRV_UART1_ReadByte( void)
1.2.3.1.4 DRV_UART1_Write Function
Returns the number of bytes written into the internal buffer
File
drv_uart1.h
Syntax
unsigned int DRV_UART1_Write(const uint8_t * buffer, const unsigned int numbytes);
Description
This API transfers the data from application buffer to internal buffer and returns the number of bytes added in that queue
Remarks
None
Preconditions
DRV_UART1_InitializerDefault function should have been called before calling this function
Example
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
DRV_UART1_TRANSFER_STATUS status ;
// Pre-initialize myBuffer with MY_BUFFER_SIZE bytes of valid data.
numBytes = 0;
while( numBytes < MY_BUFFER_SIZE);
{
status = DRV_UART1_TransferStatus ( ) ;
1.2 UART Driver MLA - Drivers Help Driver Interface
26
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_driver.pdf