Skip to content

ArduinoCore API-integration, why is the AVR-core not using the classes HardwareI2C, HardwareSerial or HardwareSPI from the API? #580

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
Guswib opened this issue Dec 2, 2024 · 0 comments · May be fixed by #329

Comments

@Guswib
Copy link

Guswib commented Dec 2, 2024

First of all, thank you all for all your hard work in the Arduino platform.

I have some questions regarding the ArduinoCore API integration of the AVR-core.

In ArduinoCore API there are the following classes: HardwareSPI, HardwareI2C and HardwareSerial. All of them are inheriting from the Stream-class.

  1. Does anyone know why the classes TwoWire, SPI do not inherit from corresponding API-classes, but just inherit from Stream? Changing the inheritance should not break anything, but help with the standarization of function names.

  2. Similarly, is there a reason why avr::HardwareSerial.h is not inherit from ArduinoAPI::HardwareSerial.h? It looks like most definitions in the avr-version is already expressed in the API.

  3. Why is not SoftwareSerial-class also inherit from ArduinoAPI::HardwareSPI?

Thanks.

@per1234 per1234 linked a pull request Dec 4, 2024 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant