]> mj.ucw.cz Git - home-hw.git/blobdiff - Src/main.c
BMP partial
[home-hw.git] / Src / main.c
index 043fe33869050840d43adf271d6110e661263783..e2769f28a80d9b21d157df368d6bc03692020fb1 100644 (file)
@@ -125,7 +125,7 @@ int main(void)
   /* USER CODE BEGIN 2 */
   display_init();
   usb_start(&usb);
-  // bmp_init();
+  bmp_init();
 
   LL_TIM_EnableCounter(TIM4);
   LL_TIM_EnableIT_UPDATE(TIM4);
@@ -146,11 +146,17 @@ int main(void)
       {
        display_buffer(rx_packet);
        tx_packet_state = 1;
+       tx_packet[0] = adjusted_temp >> 8;
+       tx_packet[1] = adjusted_temp & 0xff;
+       tx_packet[2] = adjusted_press >> 8;
+       tx_packet[3] = adjusted_press & 0xff;
        usb_ep_send(&usb, 0x82, tx_packet, 8);
        rx_packet_state = 0;
        usb_ep_receive(&usb, 0x01, rx_packet, 64);
       }
 
+    bmp_step();
+
     // debug_printf("Counter = %d\n", cnt);
     // display_counter(cnt);