Skip to content

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

Open
@Guswib

Description

@Guswib

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions