- *(tx_packet->buf + 0) = USBMouse_Buttons;
- *(tx_packet->buf + 1) = 0;
- *(tx_packet->buf + 2) = 0;
- *(tx_packet->buf + 3) = 0;
- *(tx_packet->buf + 4) = 0;
- tx_packet->len = 5;
+ uint16_t *packet_data = (uint16_t*)(&tx_packet->buf[0]);
+ packet_data[0] = USBMouse_Buttons;
+ packet_data[1] = USBMouse_Relative_x;
+ packet_data[2] = USBMouse_Relative_y;
+ tx_packet->len = 6;