Merge pull request #3038 from jepler/compute-usb-devices

Compute USB_DEVICES instead of requiring it to be specified
This commit is contained in:
Jeff Epler 2020-06-24 13:31:56 -05:00 committed by GitHub
commit 87835c77e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 65 additions and 77 deletions

View File

@ -3,8 +3,6 @@ USB_PID = 0x0101
USB_PRODUCT = "Commander"
USB_MANUFACTURER = "8086 Consultancy"
USB_DEVICES= "CDC,MSC,HID"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
@ -14,6 +12,7 @@ EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ"
LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0
CIRCUITPY_USB_MIDI = 0
SUPEROPT_GC = 0

View File

@ -46,8 +46,6 @@ CIRCUITPY_MATH = 1
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pewpew_m4
CIRCUITPY_DISPLAY_FONT = $(TOP)/ports/atmel-samd/boards/ugame10/brutalist-6.bdf
USB_DEVICES = "CDC,MSC"
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 45

View File

@ -4,7 +4,6 @@ USB_VID = 0x239A
USB_PID = 0x6005
USB_PRODUCT = "Big Honking Button"
USB_MANUFACTURER = "Winterbloom"
USB_DEVICES = "CDC,MSC"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
@ -31,4 +30,5 @@ CIRCUITPY_TOUCHIO = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_RTC = 0

View File

@ -6,7 +6,6 @@ USB_PID = 0x8062
USB_PRODUCT = "Sol"
USB_MANUFACTURER = "Winterbloom"
USB_INTERFACE_NAME = "Sol"
USB_DEVICES = "CDC,MSC,AUDIO"
CHIP_VARIANT = SAMD51J20A
CHIP_FAMILY = samd51

View File

@ -1,5 +1,4 @@
USB_SERIAL_NUMBER_LENGTH = 10
USB_DEVICES = "CDC,MSC"
USB_MSC_MAX_PACKET_SIZE = 512
USB_RENUMBER_ENDPOINTS = 0
USB_CDC_EP_NUM_NOTIFICATION = 3
@ -8,15 +7,17 @@ USB_CDC_EP_NUM_DATA_IN = 1
USB_MSC_EP_NUM_OUT = 5
USB_MSC_EP_NUM_IN = 4
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_NVM = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_NVM = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
INTERNAL_LIBM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x80A8
USB_PRODUCT = "Saola 1 w/WROOM"
USB_MANUFACTURER = "Espressif"
USB_DEVICES = "CDC,MSC,HID"
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x80A6
USB_PRODUCT = "Saola 1 w/WROVER"
USB_MANUFACTURER = "Espressif"
USB_DEVICES = "CDC,MSC,HID"
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

View File

@ -30,8 +30,8 @@ CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_TOUCHIO = 0
# Enable USB support
# Enable USB HID support
CIRCUITPY_USB_HID = 1
CIRCUITPY_USB_MIDI = 1
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_MODULE ?= none

View File

@ -2,7 +2,6 @@ USB_VID = 0x1209
USB_PID = 0x5BF0
USB_PRODUCT = "Fomu"
USB_MANUFACTURER = "Foosn"
USB_DEVICES = "CDC,MSC,AUDIO,HID"
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

View File

@ -14,7 +14,6 @@ endif
INTERNAL_LIBM = 1
USB_DEVICES = "CDC,MSC,HID"
USB_SERIAL_NUMBER_LENGTH = 32
USB_MSC_MAX_PACKET_SIZE = 512
@ -27,4 +26,5 @@ CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_NVM = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_USB_MIDI = 0
LONGINT_IMPL = MPZ

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x808E
USB_PRODUCT = "Espruino Pico"
USB_MANUFACTURER = "Espruino"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x8090
USB_PRODUCT = "Espruino Wifi"
USB_MANUFACTURER = "Espruino"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x805A
USB_PRODUCT = "Feather STM32F405 Express"
USB_MANUFACTURER = "Adafruit Industries LLC"
USB_DEVICES = "CDC,MSC"
SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x805A
USB_PRODUCT = "Meowbit"
USB_MANUFACTURER = "Kittenbot"
USB_DEVICES = "CDC,MSC"
SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x809E
USB_PRODUCT = "Nucleo F746zg - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x809A
USB_PRODUCT = "Nucleo F767ZI - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x8098
USB_PRODUCT = "Nucleo H743ZI - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x80A4
USB_PRODUCT = "OpenMV-H7 R1"
USB_MANUFACTURER = "OpenMV, LLC"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x8068
USB_PRODUCT = "PYB LR Nano V2"
USB_MANUFACTURER = "MicroPython Chinese Community"
USB_DEVICES = "CDC,MSC"
SPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x805C
USB_PRODUCT = "Pyboard Version 1.1"
USB_MANUFACTURER = "George Robotic"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x806A
USB_PRODUCT = "stm32f411ce blackpill"
USB_MANUFACTURER = "Unknown"
USB_DEVICES = "CDC,MSC"
# SPI_FLASH_FILESYSTEM = 1
# EXTERNAL_FLASH_DEVICE_COUNT = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x805E
USB_PRODUCT = "STM32F411VE Discovery Board - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x8056
USB_PRODUCT = "STM32F412ZG Discovery Board - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC,HID"
INTERNAL_FLASH_FILESYSTEM = 1
@ -17,3 +16,5 @@ MCU_PACKAGE = LQFP144
LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F412_fs.ld
CIRCUITPY_USB_HID = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x808A
USB_PRODUCT = "STM32F407VG Discovery Board - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x809C
USB_PRODUCT = "ST STM32F746G Discovery - CPy"
USB_MANUFACTURER = "STMicroelectronics"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -2,7 +2,6 @@ USB_VID = 0x239A
USB_PID = 0x806A
USB_PRODUCT = "Thunderpack STM32F411"
USB_MANUFACTURER = "Jeremy Gillick"
USB_DEVICES = "CDC,MSC"
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE

View File

@ -1,53 +1,56 @@
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
LONGINT_IMPL = MPZ
INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 24
MPY_TOOL_LONGINT_IMPL ?= -mlongint-impl=mpz
LONGINT_IMPL ?= MPZ
INTERNAL_LIBM ?= 1
USB_SERIAL_NUMBER_LENGTH ?= 24
ifeq ($(MCU_VARIANT),STM32F405xx)
CIRCUITPY_FRAMEBUFFERIO = 1
CIRCUITPY_RGBMATRIX = 1
CIRCUITPY_FRAMEBUFFERIO ?= 1
CIRCUITPY_RGBMATRIX ?= 1
endif
ifeq ($(MCU_SERIES),F4)
# Not yet implemented common-hal modules:
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0
# Can be overridden on board level
ifndef CIRCUITPY_NVM
CIRCUITPY_NVM = 0
endif
CIRCUITPY_AUDIOBUSIO ?= 0
CIRCUITPY_AUDIOIO ?= 0
CIRCUITPY_COUNTIO ?= 0
CIRCUITPY_FREQUENCYIO ?= 0
CIRCUITPY_I2CSLAVE ?= 0
CIRCUITPY_NVM ?= 0
CIRCUITPY_ROTARYIO ?= 0
CIRCUITPY_RTC ?= 0
CIRCUITPY_USB_MIDI ?= 0
CIRCUITPY_USB_HID ?= 0
endif
ifeq ($(MCU_SERIES),H7)
# Not yet implemented common-hal modules:
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NVM = 0
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_ANALOGIO ?= 0
CIRCUITPY_AUDIOBUSIO ?= 0
CIRCUITPY_AUDIOIO ?= 0
CIRCUITPY_COUNTIO ?= 0
CIRCUITPY_FREQUENCYIO ?= 0
CIRCUITPY_I2CSLAVE ?= 0
CIRCUITPY_NEOPIXEL_WRITE ?= 0
CIRCUITPY_NVM ?= 0
CIRCUITPY_PULSEIO ?= 0
CIRCUITPY_ROTARYIO ?= 0
CIRCUITPY_RTC ?= 0
CIRCUITPY_USB_HID ?= 0
CIRCUITPY_USB_MIDI ?= 0
endif
ifeq ($(MCU_SERIES),F7)
# Not yet implemented common-hal modules:
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_NVM = 0
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_COUNTIO = 0
CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_ANALOGIO ?= 0
CIRCUITPY_AUDIOBUSIO ?= 0
CIRCUITPY_AUDIOIO ?= 0
CIRCUITPY_COUNTIO ?= 0
CIRCUITPY_FREQUENCYIO ?= 0
CIRCUITPY_I2CSLAVE ?= 0
CIRCUITPY_NEOPIXEL_WRITE ?= 0
CIRCUITPY_NVM ?= 0
CIRCUITPY_ROTARYIO ?= 0
CIRCUITPY_RTC ?= 0
CIRCUITPY_USB_HID ?= 0
CIRCUITPY_USB_MIDI ?= 0
endif

View File

@ -115,9 +115,14 @@ ifndef USB_INTERFACE_NAME
USB_INTERFACE_NAME = "CircuitPython"
endif
ifndef USB_DEVICES
USB_DEVICES = "CDC,MSC,AUDIO,HID"
USB_DEVICES_COMPUTED := CDC,MSC
ifeq ($(CIRCUITPY_USB_MIDI),1)
USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED),AUDIO
endif
ifeq ($(CIRCUITPY_USB_HID),1)
USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED),HID
endif
USB_DEVICES ?= "$(USB_DEVICES_COMPUTED)"
ifndef USB_HID_DEVICES
USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"