1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Made MSC initialisation pin configurable. (#5535)

This commit is contained in:
Michael Keller 2018-03-27 01:04:59 +13:00 committed by GitHub
parent 605962d9a5
commit 83e614c139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 99 additions and 69 deletions

View file

@ -123,6 +123,7 @@ extern uint8_t __config_end;
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/rx_pwm.h"
#include "pg/usb.h"
#include "rx/rx.h"
#include "rx/spektrum.h"
@ -3304,6 +3305,9 @@ const cliResourceValue_t resourceTable[] = {
#ifdef USE_PINIO
{ OWNER_PINIO, PG_PINIO_CONFIG, offsetof(pinioConfig_t, ioTag), PINIO_COUNT },
#endif
#if defined(USE_USB_MSC)
{ OWNER_USB_MSC_PIN, PG_USB_CONFIG, offsetof(usbDev_t, mscButtonPin), 0 },
#endif
};
static ioTag_t *getIoTag(const cliResourceValue_t value, uint8_t index)

View file

@ -962,6 +962,9 @@ const clivalue_t valueTable[] = {
#ifdef USE_USB_CDC_HID
{ "usb_hid_cdc", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_USB_CONFIG, offsetof(usbDev_t, type) },
#endif
#ifdef USE_USB_MSC
{ "usb_msc_pin_pullup", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_USB_CONFIG, offsetof(usbDev_t, mscButtonUsePullup) },
#endif
};
const uint16_t valueTableEntryCount = ARRAYLEN(valueTable);