I wanted to know the difference between synchronous and asynchronous way of UART data transmission. The synchronous or blocking Uart transmission is i assume is something like below
I am confused with Asynchronous transmission
But what is the periodicity at which i shall be calling the function AsynchSendData(), if i have to send some 10 characters. If i am using interrupt based UART transmission.
Code:
void Blockng_SendData(uint8_t *data, uint8_t len)
{
uint8_t index=0;
while(len-- != 0)
{
local_tx_buffer[index++] = *data++;
UART1_Write(*data);
}
}
Code:
static uint8_t local_tx_buffer[20];
void AsynchSendData(uint8_t *data, uint8_t len)
{
static uint8_t index=0;
local_tx_buffer[index++] = *data++;
UART1_Write(*data);
}