Vault 7: Projects

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

Description
1.2.3.3.1 DRV_UART1_InitializerDefault Function
Initializes the UART instance : 1
File
drv_uart1.h
Syntax
void DRV_UART1_InitializerDefault();
Returns
None.
Description
This routine initializes the UART driver instance for : 1 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_UART1_InitializerDefault();
while(numBytes < writebufferLen)
{
int bytesToWrite = DRV_UART1_TXBufferSizeGet();
numBytes = DRV_UART1_Write ( writeBuffer+numBytes, bytesToWrite) ;
DRV_UART1_TasksTX ( );
if (!DRV_UART1_TXBufferisFull())
{
//continue other operation
}
}
Function
void DRV_UART1_InitializerDefault(void)
1.2.3.3.2 DRV_UART1_TasksError Function
Maintains the driver's error-handling state machine in a polled manner.
File
drv_uart1.h
Syntax
void DRV_UART1_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.
1.2 UART Driver MLA - Drivers Help Driver Interface
45

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh