# 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
…
- 22
- 23
- 24
- 25
- 26
…
- 82
- 83

DRV_UART3_Peek Returns the character in the read sequence at the offset provided,
without extracting it
DRV_UART3_Read Returns the number of bytes read by the UART3 peripheral
DRV_UART3_ReadByte Reads a byte of data from the UART3
DRV_UART3_Write Returns the number of bytes written into the internal buffer
DRV_UART3_WriteByte Writes a byte of data to the UART3
DRV_UART4_Peek Returns the character in the read sequence at the offset provided,
without extracting it
DRV_UART4_Read Returns the number of bytes read by the UART4 peripheral
DRV_UART4_ReadByte Reads a byte of data from the UART4
DRV_UART4_Write Returns the number of bytes written into the internal buffer
DRV_UART4_WriteByte Writes a byte of data to the UART4
Description
1.2.3.1.1 DRV_UART1_Peek Function
Returns the character in the read sequence at the offset provided, without extracting it
File
drv_uart1.h
Syntax
uint8_t DRV_UART1_Peek(uint16_t offset);
Description
This routine returns the character in the read sequence at the offset provided, without extracting it
Example
const uint8_t readBuffer[5];
unsigned int data, numBytes = 0;
unsigned int readbufferLen = sizeof(readBuffer);
DRV_UART1_InitializerDefault();
while(numBytes < readbufferLen)
{
DRV_UART1_TasksRX ( );
//Check for data at a particular place in the buffer
data = DRV_UART1_Peek(3);
if(data == 5)
{
//discard all other data if byte that is wanted is received.
//continue other operation
numBytes += DRV_UART1_Read ( readBuffer + numBytes , readbufferLen ) ;
}
else
{
break;
}
}
Function
uint8_t DRV_UART1_Peek(uint16_t offset)
1.2.3.1.2 DRV_UART1_Read Function
Returns the number of bytes read by the UART1 peripheral
1.2 UART Driver MLA - Drivers Help Driver Interface
24

- 1
- 2
…
- 22
- 23
- 24
- 25
- 26
…
- 82
- 83