arduino / arduino/ArduinoCore-mbed

want UART methods to be virtual methods.

Open
#928 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

MbedSPI and MbedI2C methods are declared as virtual methods.
However the UART methods are not.

Since we want to create our own driver by inheriting from UART, it would be nice if the UART methods were also declared as virtual methods.

https://github.com/arduino/ArduinoCore-mbed/blob/1399d6477548f3f5585155652511d68d3ef85951/libraries/Wire/Wire.h#L34-L68

https://github.com/arduino/ArduinoCore-mbed/blob/1399d6477548f3f5585155652511d68d3ef85951/libraries/SPI/SPI.h#L28-L48

https://github.com/arduino/ArduinoCore-mbed/blob/1399d6477548f3f5585155652511d68d3ef85951/cores/arduino/Serial.h#L39-L67

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with cores/arduino/Serial.h and compare its UART declarations with the virtual methods in libraries/Wire/Wire.h and libraries/SPI/SPI.h. Update the UART declarations so inherited drivers can override them, then verify the headers still compile and that the UART interface matches the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.