You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Arduino Core API defines a very low level USB api in api/USBAPI.h. This API is implemented by the avr core in cores/arduino/USBCore.cpp. But it is not implemented by samd core, which implements the same functionality but in its own USBDeviceClass class. 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?
The text was updated successfully, but these errors were encountered:
Yes unfortunately the api for drivers such as usb are not compatible. What I have learned is that the Arduino ecosystem is only useful for one time prototypes but does not scale well enough as you need to modify the software to integrate it into different hardware. Example of this are the libraries that support multiple boards. They typically use #if #ifdef to mitigate the differences in API.
The Arduino Core API defines a very low level USB api in api/USBAPI.h. This API is implemented by the avr core in cores/arduino/USBCore.cpp. But it is not implemented by samd core, which implements the same functionality but in its own
USBDeviceClass
class. 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 thePluggableUSBModule
.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?
The text was updated successfully, but these errors were encountered: