Added MSP for USB HID configuration.

This commit is contained in:
mikeller 2018-07-15 17:23:08 +12:00
parent 46fec897ed
commit 76a51e989e
1 changed files with 10 additions and 0 deletions

View File

@ -1126,6 +1126,11 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
sbufWriteU8(dst, 0);
sbufWriteU8(dst, 0);
#endif
#if defined(USE_USB_CDC_HID)
sbufWriteU8(dst, usbDevConfig()->type);
#else
sbufWriteU8(dst, 0);
#endif
break;
case MSP_FAILSAFE_CONFIG:
@ -2055,6 +2060,11 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
sbufReadU8(src);
sbufReadU8(src);
sbufReadU8(src);
#endif
#if defined(USE_USB_CDC_HID)
usbDevConfigMutable()->type = sbufReadU8(src);
#else
sbufReadU8(src);
#endif
}