Vault 7: Projects

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

if (status & DRV_UART1_TRANSFER_STATUS_TX_EMPTY)
{
numBytes += DRV_UART1_Write ( myBuffer + numBytes, MY_BUFFER_SIZE - numBytes ) ;
if(numBytes < writebufferLen)
{
continue;
}
else
{
break;
}
}
else
{
continue;
}
// Do something else...
}
Function
unsigned int DRV_UART1_Write( uint8_t *buffer, const unsigned int numbytes )
1.2.3.1.5 DRV_UART1_WriteByte Function
Writes a byte of data to the UART1
File
drv_uart1.h
Syntax
void DRV_UART1_WriteByte(const uint8_t byte);
Returns
None.
Description
This routine writes a byte of data to the UART1.
Preconditions
DRV_UART1_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_UART1_TRANSFER_STATUS_TX_FULL & DRV_UART1_TransferStatus()) )
{
DRV_UART1_WriteByte(handle, myBuffer[numBytes++]);
}
// Do something else...
}
Parameters
Parameters Description
byte Data byte to write to the UART1
1.2 UART Driver MLA - Drivers Help Driver Interface
27

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh