Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Simplifying my USART code [ char string]

$
0
0
Hey guys,
so i created this code
Code (Text):
  1. int main(void)
  2. {
  3. //    PLL_Config();
  4.     SystemCoreClockUpdate();
  5.     char string[]= "Hello World";
  6.     int i=0;
  7.        
  8.     while(!(USART_MODULE->SR&USART_SR_RXNE))
  9.     for (i=0; i<11; i++)
  10.     {
  11.        
  12.         init_USART();
  13.         send_usart(string[i]);
  14.            
  15.     }
  16.     while (string[i]!=0);
ignoring the while loop and the other functions. I would like to simplify my char string and somehow turn it into a function. I'm using putty to...

Simplifying my USART code [ char string]

Viewing all articles
Browse latest Browse all 4923

Trending Articles