{
byte buf[5] = { 0xff, 0xff, 10, 0xff, 0xff };
display_buffer(buf);
}
{
byte buf[5] = { 0xff, 0xff, 10, 0xff, 0xff };
display_buffer(buf);
}
- static byte led_state;
- if (led_state)
- LL_GPIO_SetOutputPin(LED_GPIO_Port, LED_Pin);
- else
- LL_GPIO_ResetOutputPin(LED_GPIO_Port, LED_Pin);
- led_state ^= 1;
-
- // display_buffer(rx_packet);
+ static byte led_state;
+ if (led_state)
+ LL_GPIO_SetOutputPin(LED_GPIO_Port, LED_Pin);
+ else
+ LL_GPIO_ResetOutputPin(LED_GPIO_Port, LED_Pin);
+ led_state ^= 1;
+
+ display_buffer(rx_packet);
tx_packet_state = 1;
put_u32_be(tx_packet, adjusted_temp);
put_u32_be(tx_packet + 4, adjusted_press);
tx_packet_state = 1;
put_u32_be(tx_packet, adjusted_temp);
put_u32_be(tx_packet + 4, adjusted_press);
usb_ep_send(&usb, 0x82, tx_packet, 12);
rx_packet_state = 0;
usb_ep_receive(&usb, 0x01, rx_packet, 64);
usb_ep_send(&usb, 0x82, tx_packet, 12);
rx_packet_state = 0;
usb_ep_receive(&usb, 0x01, rx_packet, 64);