# 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
…
- 53
- 54
- 55
- 56
- 57
…
- 82
- 83

1.2.3.4.1 DRV_UART1_RXBufferIsEmpty Function
Returns the status of the receive buffer
File
drv_uart1.h
Syntax
bool DRV_UART1_RXBufferIsEmpty();
Returns
True if the receive buffer is empty False if the receive buffer is not empty
Description
This routine returns if the receive buffer is empty or not.
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 ( ) ;
if (!DRV_UART1_RXBufferIsEmpty())
{
numBytes += DRV_UART1_Read( myBuffer + numBytes, MY_BUFFER_SIZE - numBytes ) ;
if(numBytes < readbufferLen)
{
continue;
}
else
{
break;
}
}
else
{
continue;
}
// Do something else...
}
Function
bool DRV_UART1_RXBufferIsEmpty (void)
1.2.3.4.2 DRV_UART1_RXBufferSizeGet Function
Returns the size of the receive buffer
File
drv_uart1.h
Syntax
unsigned int DRV_UART1_RXBufferSizeGet();
Returns
Size of receive buffer.
1.2 UART Driver MLA - Drivers Help Driver Interface
55

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