Vault 7: Projects

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

Function
unsigned int DRV_UART4_Read(uint8_t *buffer, const unsigned int numbytes )
1.2.3.1.18 DRV_UART4_ReadByte Function
Reads a byte of data from the UART4
File
drv_uart4.h
Syntax
uint8_t DRV_UART4_ReadByte();
Returns
A data byte received by the driver.
Description
This routine reads a byte of data from the UART4.
Preconditions
DRV_UART4_InitializerDefault function should have been called before calling this function. The transfer status should be
checked to see if the receiver is not empty before calling this function.
Example
char myBuffer[MY_BUFFER_SIZE];
unsigned int numBytes;
numBytes = 0;
do
{
if( DRV_UART4_TRANSFER_STATUS_RX_DATA_PRESENT & DRV_UART4_TransferStatus() )
{
myBuffer[numBytes++] = DRV_UART4_ReadByte();
}
// Do something else...
} while( numBytes < MY_BUFFER_SIZE);
Function
uint8_t DRV_UART4_ReadByte( void)
1.2.3.1.19 DRV_UART4_Write Function
Returns the number of bytes written into the internal buffer
File
drv_uart4.h
Syntax
unsigned int DRV_UART4_Write(const uint8_t * buffer, const unsigned int numbytes);
Description
This API transfers the data from application buffer to internal buffer and returns the number of bytes added in that queue
Remarks
None
Preconditions
DRV_UART4_InitializerDefault function should have been called before calling this function
1.2 UART Driver MLA - Drivers Help Driver Interface
37

e-Highlighter

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

Un-highlight all Un-highlight selectionu Highlight selectionh