// 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;
+ put_u32_be(tx_packet, adjusted_temp);
+ put_u32_be(tx_packet + 4, adjusted_press);
usb_ep_send(&usb, 0x82, tx_packet, 8);
rx_packet_state = 0;
usb_ep_receive(&usb, 0x01, rx_packet, 64);