Vault 7: Projects

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

Example
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
DRV_UART4_TRANSFER_STATUS status ;
// Pre-initialize myBuffer with MY_BUFFER_SIZE bytes of valid data.
numBytes = 0;
while( numBytes < MY_BUFFER_SIZE);
{
status = DRV_UART4_TransferStatus ( ) ;
if (status & DRV_UART4_TRANSFER_STATUS_TX_EMPTY)
{
numBytes += DRV_UART4_Write ( myBuffer + numBytes, MY_BUFFER_SIZE - numBytes ) ;
if(numBytes < writebufferLen)
{
continue;
}
else
{
break;
}
}
else
{
continue;
}
// Do something else...
}
Function
unsigned int DRV_UART4_Write( uint8_t *buffer, const unsigned int numbytes )
1.2.3.1.20 DRV_UART4_WriteByte Function
Writes a byte of data to the UART4
File
drv_uart4.h
Syntax
void DRV_UART4_WriteByte(const uint8_t byte);
Returns
None.
Description
This routine writes a byte of data to the UART4.
Preconditions
DRV_UART4_InitializerDefault function should have been called before calling this function. The transfer status should be
checked to see if transmitter is not full before calling this function.
Example
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
// Pre-initialize myBuffer with MY_BUFFER_SIZE bytes of valid data.
numBytes = 0;
while( numBytes < MY_BUFFER_SIZE);
{
if( !(DRV_UART4_TRANSFER_STATUS_TX_FULL & DRV_UART4_TransferStatus()) )
1.2 UART Driver MLA - Drivers Help Driver Interface
38

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh