| 130 | U2fHidDevice() : _hid(HID_ITF_PROTOCOL_NONE) { USBHID::addDevice(this, sizeof(U2F_REPORT_DESCRIPTOR)); } |
| 131 | |
| 132 | void begin() { |
| 133 | if (_started) return; |
| 134 | USB.begin(); |
| 135 | _hid.begin(); |
| 136 | uint32_t t0 = millis(); |
| 137 | while (!_hid.ready() && (millis() - t0) < 4000) delay(10); |
| 138 | loadState(); |
| 139 | _started = true; |
| 140 | } |
| 141 | |
| 142 | void end() { |
| 143 | if (!_started) return; |
no test coverage detected