aboutsummaryrefslogtreecommitdiff
path: root/stm32/src/usart_ut.c
blob: b8b229fa516f6cf95f433764bbb532cc5ddc7a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
  usart_ut.c
  David Rowe May 2019

  Unit test for stm32 USART support.

  tio is useful to receive the serial strings:

    $ tio -m INLCRNL /dev/ttyUSB0 
*/

#include <stm32f4xx.h>
#include "stm32f4_usart.h"

void Delay(uint32_t nCount)
{
  while(nCount--)
  {
  }
}

int main(void){

 usart_init();

 while(1){
   usart_puts("Hello, World\n");
   Delay(0x3FFFFF);
 }
}