add get_version command to hid
This commit is contained in:
parent
b20ca7c5f7
commit
0945ad264c
@ -729,6 +729,21 @@ uint8_t ctaphid_handle_packet(uint8_t * pkt_raw)
|
|||||||
ctaphid_write(&wb, NULL, 0);
|
ctaphid_write(&wb, NULL, 0);
|
||||||
is_busy = 0;
|
is_busy = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CTAPHID_GETVERSION:
|
||||||
|
printf1(TAG_HID,"CTAPHID_GETVERSION\n");
|
||||||
|
ctap_response_init(&ctap_resp);
|
||||||
|
ctaphid_write_buffer_init(&wb);
|
||||||
|
wb.cid = cid;
|
||||||
|
wb.cmd = CTAPHID_GETVERSION;
|
||||||
|
wb.bcnt = 3;
|
||||||
|
ctap_buffer[0] = SOLO_VERSION_MAJ;
|
||||||
|
ctap_buffer[1] = SOLO_VERSION_MIN;
|
||||||
|
ctap_buffer[2] = SOLO_VERSION_PATCH;
|
||||||
|
ctaphid_write(&wb, &ctap_buffer, 3);
|
||||||
|
ctaphid_write(&wb, NULL, 0);
|
||||||
|
is_busy = 0;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#define CTAPHID_ENTERBOOT (TYPE_INIT | 0x51)
|
#define CTAPHID_ENTERBOOT (TYPE_INIT | 0x51)
|
||||||
#define CTAPHID_ENTERSTBOOT (TYPE_INIT | 0x52)
|
#define CTAPHID_ENTERSTBOOT (TYPE_INIT | 0x52)
|
||||||
#define CTAPHID_GETRNG (TYPE_INIT | 0x60)
|
#define CTAPHID_GETRNG (TYPE_INIT | 0x60)
|
||||||
|
#define CTAPHID_GETVERSION (TYPE_INIT | 0x61)
|
||||||
// reserved for debug, not implemented except for HACKER and DEBUG_LEVEl > 0
|
// reserved for debug, not implemented except for HACKER and DEBUG_LEVEl > 0
|
||||||
#define CTAPHID_PROBE (TYPE_INIT | 0x70)
|
#define CTAPHID_PROBE (TYPE_INIT | 0x70)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user