Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add legacy I2C/SPI pin aliases #14617

Merged
merged 3 commits into from
Jun 9, 2021
Merged

Add legacy I2C/SPI pin aliases #14617

merged 3 commits into from
Jun 9, 2021

Conversation

gpsimenos
Copy link
Contributor

Summary of changes

This PR adds definitions for the legacy I2C/SPI pin names to ensure backwards compatibility until all PinNames.h files are updated.

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@jeromecoutant @0xc0170


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label May 4, 2021
@ciarmcom ciarmcom requested a review from 0xc0170 May 4, 2021 15:00
@ciarmcom
Copy link
Member

ciarmcom commented May 4, 2021

@gpsimenos, thank you for your changes.
@0xc0170 @jeromecoutant @ARMmbed/mbed-os-maintainers please review.

MarceloSalazar
MarceloSalazar previously approved these changes May 4, 2021
Copy link

@MarceloSalazar MarceloSalazar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok as short term fix although we'll need to set the defaults accordingly.
Note, not all boards have an Arduino Uno connector.

@MarceloSalazar
Copy link

@ARMmbed/mbed-os-maintainers can you please progress with CI and merge soon?

0xc0170
0xc0170 previously approved these changes May 6, 2021
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI was in maintenance mode for day and a half, we are ready to get CI queue full now

@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2021

CI started

@mergify mergify bot added needs: work and removed needs: CI labels May 7, 2021
@mbed-ci
Copy link

mbed-ci commented May 7, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-ARM
jenkins-ci/mbed-os-ci_build-example-GCC_ARM

@ciarmcom ciarmcom added the stale Stale Pull Request label May 19, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @gpsimenos, please carry out any necessary work to get the changes merged. Thank you for your contributions.

@0xc0170
Copy link
Contributor

0xc0170 commented May 19, 2021

@gpsimenos Failures look related, please review

@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 21, 2021
@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels May 28, 2021
@@ -86,12 +86,35 @@
#define ARDUINO_UNO_I2C_SDA ARDUINO_UNO_D14
#define ARDUINO_UNO_I2C_SCL ARDUINO_UNO_D15

// Legacy I2C aliases
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be protected by
#ifdef TARGET_FF_ARDUINO_UNO

as targets which are not compliant with pin standard are already defining I2C_SDA in enum

@jeromecoutant
Copy link
Collaborator

@gpsimenos @MarceloSalazar
please update this patch

@jeromecoutant
Copy link
Collaborator

Is it possible to add the same protection for each legacy alias:
#ifndef A0
#define A0 ARDUINO_UNO_A0
#endif

As a customer could locally defined his own A0 pin

@mergify mergify bot dismissed stale reviews from MarceloSalazar and 0xc0170 June 2, 2021 13:26

Pull request has been modified.

@ciarmcom ciarmcom removed the stale Stale Pull Request label Jun 2, 2021
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's restart CI ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 9, 2021

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jun 9, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 386f197 into master Jun 9, 2021
@mergify mergify bot removed the ready for merge label Jun 9, 2021
@mbedmain mbedmain added release-version: 6.12.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 18, 2021
@0xc0170 0xc0170 deleted the gp-spi2c-alias branch October 5, 2021 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants