arduino / arduino/ArduinoCore-API

Each core provides a different USBAPI

未关闭
#141 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
306
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 api/USBAPI.h 开始,比较 issue 中提到的 avr、samd、megaavr 和 mbed core 路径中的实现,包括 USBCore.cpp、USBDeviceClass 和 PluggableUSBModule。issue 没有定义具体的更改,因此首先确定预期的兼容性范围;完成的标准是就受影响的各个 core 之间的通用 USB API 达成一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
api, embedded-iot
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。