1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Updates for NERO. Fix for 20602, move i2c for LEDs

Update the config for VCD to populate only 1 interface, and use device class allowing for built in Windows 10 driver.
This commit is contained in:
blckmn 2017-04-22 22:51:46 +10:00
parent de7e81918c
commit d229bacc60
4 changed files with 10 additions and 3 deletions

View file

@ -138,7 +138,12 @@ void spiInitDevice(SPIDevice device)
spi->leadingEdge = true; spi->leadingEdge = true;
} }
#endif #endif
#ifdef MPU6500_SPI_INSTANCE
if (spi->dev == MPU6500_SPI_INSTANCE) {
spi->leadingEdge = true;
}
#endif
// Enable SPI clock // Enable SPI clock
RCC_ClockCmd(spi->rcc, ENABLE); RCC_ClockCmd(spi->rcc, ENABLE);
RCC_ResetCmd(spi->rcc, ENABLE); RCC_ResetCmd(spi->rcc, ENABLE);

View file

@ -70,6 +70,8 @@
#define USE_I2C #define USE_I2C
#define USE_I2C_DEVICE_1 #define USE_I2C_DEVICE_1
#define I2C_DEVICE (I2CDEV_1) #define I2C_DEVICE (I2CDEV_1)
#define I2C1_SCL PB8
#define I2C1_SDA PB9
#define USE_VCP #define USE_VCP
//#define VBUS_SENSING_PIN PA8 //#define VBUS_SENSING_PIN PA8

View file

@ -58,7 +58,7 @@
/* Exported types ------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/
/* Common Config */ /* Common Config */
#define USBD_MAX_NUM_INTERFACES 1 #define USBD_MAX_NUM_INTERFACES 0
#define USBD_MAX_NUM_CONFIGURATION 1 #define USBD_MAX_NUM_CONFIGURATION 1
#define USBD_MAX_STR_DESC_SIZ 0x100 #define USBD_MAX_STR_DESC_SIZ 0x100
#define USBD_SUPPORT_USER_STRING 0 #define USBD_SUPPORT_USER_STRING 0

View file

@ -98,7 +98,7 @@ __ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = {
USB_DESC_TYPE_DEVICE, /* bDescriptorType */ USB_DESC_TYPE_DEVICE, /* bDescriptorType */
0x00, /* bcdUSB */ 0x00, /* bcdUSB */
0x02, 0x02,
0x00, /* bDeviceClass */ 0x02, /* bDeviceClass */
0x00, /* bDeviceSubClass */ 0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */ 0x00, /* bDeviceProtocol */
USB_MAX_EP0_SIZE, /* bMaxPacketSize */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */