# 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
…
- 31
- 32
- 33
- 34
- 35
…
- 82
- 83

break;
}
}
else
{
continue;
}
// Do something else...
}
Parameters
Parameters Description
buffer Buffer into which the data read from the UART3
numbytes Total number of bytes that need to be read from the UART3
(must be equal to or less than the size of the buffer)
Function
unsigned int DRV_UART3_Read(uint8_t *buffer, const unsigned int numbytes )
1.2.3.1.13 DRV_UART3_ReadByte Function
Reads a byte of data from the UART3
File
drv_uart3.h
Syntax
uint8_t DRV_UART3_ReadByte();
Returns
A data byte received by the driver.
Description
This routine reads a byte of data from the UART3.
Preconditions
DRV_UART3_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_UART3_TRANSFER_STATUS_RX_DATA_PRESENT & DRV_UART3_TransferStatus() )
{
myBuffer[numBytes++] = DRV_UART3_ReadByte();
}
// Do something else...
} while( numBytes < MY_BUFFER_SIZE);
Function
uint8_t DRV_UART3_ReadByte( void)
1.2.3.1.14 DRV_UART3_Write Function
Returns the number of bytes written into the internal buffer
1.2 UART Driver MLA - Drivers Help Driver Interface
33

- 1
- 2
…
- 31
- 32
- 33
- 34
- 35
…
- 82
- 83