]> mj.ucw.cz Git - home-hw.git/commitdiff
Nucleo test
authorMartin Mares <mj@ucw.cz>
Tue, 7 Aug 2018 18:34:32 +0000 (20:34 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 7 Aug 2018 18:34:32 +0000 (20:34 +0200)
nucleo-test/Src/test.c

index f49107fadd7cdb0f55ea42e064cf99bf178c916b..ed2bae4b6e29c8fcf73a7beb2efac5b74c489d80 100644 (file)
@@ -563,7 +563,7 @@ void run_test(void)
 
   for (;;)
     {
-      LL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
+      LL_GPIO_SetOutputPin(LD2_GPIO_Port, LD2_Pin);
       // debug_printf("Tick tock: %d\r\n", cnt);
 
       // Start measurement
@@ -580,6 +580,8 @@ void run_test(void)
       ds_recv_block(9);
       int t = (int16_t)(ds_buf[0] | (ds_buf[1] << 8));
       t = t*1000/16;
+
+      LL_GPIO_ResetOutputPin(LD2_GPIO_Port, LD2_Pin);
       debug_printf("Temp: %d.%03d degC\r\n", t/1000, t%1000);
 
       LL_mDelay(1000);