# Vault 7: Projects

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

### Protego

# MLA -- Drivers

20 December, 2013

- 1
- 2
…
- 54
- 55
- 56
- 57
- 58
…
- 82
- 83

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_UART1__InitializerDefault();
while(size < readbufferLen)
{
DRV_UART1_TasksRX ( );
size = DRV_UART1_RXBufferSizeGet();
}
numBytes = DRV_UART1_Read ( readBuffer , readbufferLen ) ;
Function
unsigned int DRV_UART1_RXBufferSizeGet (void)
1.2.3.4.3 DRV_UART1_Status Function
Returns the transmitter and receiver status
File
drv_uart1.h
Syntax
DRV_UART1_STATUS DRV_UART1_Status();
Returns
A DRV_UART1_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_UART1_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_UART1_InitializerDefault function should have been called before calling this function
Example
while(!(DRV_UART1_Status() & DRV_UART1_TX_COMPLETE ))
{
// Wait for the tranmission to complete
}
Function
DRV_UART1_STATUS DRV_UART1_Status (void)
1.2.3.4.4 DRV_UART1_TransferStatus Function
Returns the transmitter and receiver transfer status
File
drv_uart1.h
1.2 UART Driver MLA - Drivers Help Driver Interface
56

- 1
- 2
…
- 54
- 55
- 56
- 57
- 58
…
- 82
- 83