From 76a51e989e5b53c418686fd282e0b306d578ba46 Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 15 Jul 2018 17:23:08 +1200 Subject: [PATCH] Added MSP for USB HID configuration. --- src/main/interface/msp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index b93820568..4e0a5bd17 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -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 }