]> mj.ucw.cz Git - home-hw.git/commitdiff
Meggy: \n -> \r\n
authorMartin Mares <mj@ucw.cz>
Wed, 8 Aug 2018 17:49:53 +0000 (19:49 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 8 Aug 2018 17:49:53 +0000 (19:49 +0200)
nucleo-test/Src/test.c

index 0ea1e8f58b3af0b52dd67b77c87b5dff8485d7cf..1e1d58486f5120f267168981fea94ef5a7fab99d 100644 (file)
@@ -11,6 +11,8 @@ typedef int16_t s16;
 
 void debug_putc(int c)
 {
 
 void debug_putc(int c)
 {
+  if (c == '\n')
+    debug_putc('\r');
   while (!LL_USART_IsActiveFlag_TXE(USART2))
     ;
   LL_USART_TransmitData8(USART2, c);
   while (!LL_USART_IsActiveFlag_TXE(USART2))
     ;
   LL_USART_TransmitData8(USART2, c);
@@ -141,7 +143,7 @@ void run_test(void)
 
   for (;;)
     {
 
   for (;;)
     {
-      debug_printf(">>> %d\r\n", cnt);
+      debug_printf(">>> %d\n", cnt);
       cnt++;
       LL_GPIO_SetOutputPin(LD2_GPIO_Port, LD2_Pin);
       LL_GPIO_SetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);
       cnt++;
       LL_GPIO_SetOutputPin(LD2_GPIO_Port, LD2_Pin);
       LL_GPIO_SetOutputPin(MEGGY1_GPIO_Port, MEGGY1_Pin);