+ while (1) {
+ ret = usb_rawhid_recv(buf, timeout);
+ if (ret == 64) {
+ CORE_PIN13_PORTSET = CORE_PIN13_BITMASK;
+
+ memcpy(fixed_state, buf, sizeof(fixed_state));
+ timeout = 20;
+ }
+ else if (ret == 0) {
+ CORE_PIN13_PORTCLEAR = CORE_PIN13_BITMASK;
+ timeout = 1000;
+ }
+ else {
+ printf("usb_rawhid_recv: %d\n", ret);
+ timeout = 1000;
+ }