Dear all i am trying to set up a buffer through Usart and trying to send
some data through this buffer .below is my function for the buffer i
wanted to ask if my function is correct or not .? ofcourse it is not the
whole program.just wanted to know if i have made the function correct.
your response will be highly aprreciated
void USART_Puts(USART_TypeDef* USARTx,volatile char *s)
{
while(*s)
{
while(USART_GetFlagStatus(USART3, USART_FLAG_TXE) == RESET);
USART_SendData(USARTx,*s);
*s++;
}
}
void TxMessage(COM_BYTE *Buffer, COM_UINT16 count)
{
int i=0;
for (i=0;i<count;i++)
{
USART_Puts(USART3, Buffer);
}
while(1)
{
// sprintf(str, "i am USART_3 ");
// USART_Puts(USART3,str);
UI_16 Test[10];
Test[0]='H';
Test[1]='a';
Test[2]='l';
Test[3]='l';
Test[4]='o';
Test[5]=' ';
Test[6]=' ';
Test[7]=' ';
Test[8]='e';
Test[9]='o';
TxMessage (Test,10);
}