Vault 7: Projects

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

File
drv_uart2.h
Syntax
unsigned int DRV_UART2_RXBufferSizeGet();
Returns
Size of receive buffer.
Description
This routine returns the size of the receive buffer.
Example
const uint8_t readBuffer[5];
unsigned int size, numBytes = 0;
unsigned int readbufferLen = sizeof(readBuffer);
DRV_UART2__InitializerDefault();
while(size < readbufferLen)
{
DRV_UART2_TasksRX ( );
size = DRV_UART2_RXBufferSizeGet();
}
numBytes = DRV_UART2_Read ( readBuffer , readbufferLen ) ;
Function
unsigned int DRV_UART2_RXBufferSizeGet (void)
1.2.3.4.9 DRV_UART2_Status Function
Returns the transmitter and receiver status
File
drv_uart2.h
Syntax
DRV_UART2_STATUS DRV_UART2_Status();
Returns
A DRV_UART2_STATUS value describing the current status of the transfer.
Description
This returns the transmitter and receiver status.
Remarks
The returned status may contain a value with more than one of the bits specified in the DRV_UART2_STATUS enumeration
set. The caller should perform an "AND" with the bit of interest and verify if the result is non-zero (as shown in the example)
to verify the desired status bit.
Preconditions
DRV_UART2_InitializerDefault function should have been called before calling this function
Example
while(!(DRV_UART2_Status() & DRV_UART2_TX_COMPLETE ))
{
// Wait for the tranmission to complete
}
Function
DRV_UART2_STATUS DRV_UART2_Status (void)
1.2 UART Driver MLA - Drivers Help Driver Interface
59

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh