This commit is contained in:
menshiyun 2017-02-20 20:12:19 +00:00 committed by GitHub
commit 9942c37fdc

View file

@ -24,12 +24,12 @@ static char* serial_port_name;
void cmd_debug(UsbCommand* UC) { void cmd_debug(UsbCommand* UC) {
// Debug // Debug
printf("UsbCommand length[len=%zd]\n",sizeof(UsbCommand)); printf("UsbCommand length[len=%d]\n",sizeof(UsbCommand));
printf(" cmd[len=%zd]: %016"llx"\n",sizeof(UC->cmd),UC->cmd); printf(" cmd[len=%d]: %016"llx"\n",sizeof(UC->cmd),UC->cmd);
printf(" arg0[len=%zd]: %016"llx"\n",sizeof(UC->arg[0]),UC->arg[0]); printf(" arg0[len=%d]: %016"llx"\n",sizeof(UC->arg[0]),UC->arg[0]);
printf(" arg1[len=%zd]: %016"llx"\n",sizeof(UC->arg[1]),UC->arg[1]); printf(" arg1[len=%d]: %016"llx"\n",sizeof(UC->arg[1]),UC->arg[1]);
printf(" arg2[len=%zd]: %016"llx"\n",sizeof(UC->arg[2]),UC->arg[2]); printf(" arg2[len=%d]: %016"llx"\n",sizeof(UC->arg[2]),UC->arg[2]);
printf(" data[len=%zd]: ",sizeof(UC->d.asBytes)); printf(" data[len=%d]: ",sizeof(UC->d.asBytes));
for (size_t i=0; i<16; i++) { for (size_t i=0; i<16; i++) {
printf("%02x",UC->d.asBytes[i]); printf("%02x",UC->d.asBytes[i]);
} }