arduino / arduino/ArduinoCore-API

Each core provides a different USBAPI

Offen
#141 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
306
Forks
150
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The Arduino Core API defines a very low level USB api in [api/USBAPI.h](https://github.com/arduino/ArduinoCore-API/blob/master/api/USBAPI.h). This API is implemented by the avr core in [cores/arduino/USBCore.cpp](https://github.com/arduino/ArduinoCore-avr/blob/master/cores/arduino/USBCore.cpp). But it is not implemented by samd core, which implements the same functionality but in its own [`USBDeviceClass` class](https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/USB/USBCore.cpp). The USB implementation in megaavr core (`USBCore.cpp`) is a copy of the avr usb implementation with some deviations. The mbed core implements its own version of the `PluggableUSBModule`.

As a result, each core implements its own USB API which is incompatible with the others, there exist many code duplicates and users of the USB API have to understand and adapt their code to each individual core implementation.

Are there any plans to improve this situation?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit api/USBAPI.h und vergleiche die Implementierungen in den im Issue genannten avr-, samd-, megaavr- und mbed-Core-Pfaden, einschließlich USBCore.cpp, USBDeviceClass und PluggableUSBModule. Das Issue definiert keine konkrete Änderung. Kläre daher zunächst den vorgesehenen Kompatibilitätsumfang; abgeschlossen wäre die Arbeit, wenn eine gemeinsame USB API über die betroffenen Cores hinweg vereinbart ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
api, embedded-iot
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.