# 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
…
- 50
- 51
- 52
- 53
- 54
…
- 82
- 83

1.2.3.3.13 DRV_UART4_InitializerDefault Function
Initializes the UART instance : 4
File
drv_uart4.h
Syntax
void DRV_UART4_InitializerDefault();
Returns
None.
Description
This routine initializes the UART driver instance for : 4 index, making it ready for clients to open and use it.
Remarks
This routine must be called before any other UART routine is called.
Preconditions
None.
Example
const uint8_t writeBuffer[35] = "1234567890ABCDEFGHIJKLMNOPn" ;
unsigned int numBytes = 0;
int writebufferLen = strlen((char *)writeBuffer);
DRV_UART4_InitializerDefault();
while(numBytes < writebufferLen)
{
int bytesToWrite = DRV_UART4_TXBufferSizeGet();
numBytes = DRV_UART4_Write ( writeBuffer+numBytes, bytesToWrite) ;
DRV_UART4_TasksTX ( );
if (!DRV_UART4_TXBufferisFull())
{
//continue other operation
}
}
Function
void DRV_UART4_InitializerDefault(void)
1.2.3.3.14 DRV_UART4_TasksError Function
Maintains the driver's error-handling state machine in a polled manner.
File
drv_uart4.h
Syntax
void DRV_UART4_TasksError();
Returns
None.
Description
This routine is used to maintain the driver's internal error-handling state machine.This routine is called when the state of the
errors needs to be maintained in a polled manner.
Preconditions
DRV_UART4_InitializerDefault function should have been called before calling this function in a polled loop.
1.2 UART Driver MLA - Drivers Help Driver Interface
52

- 1
- 2
…
- 50
- 51
- 52
- 53
- 54
…
- 82
- 83