Skip to content

Conversation

@idea--list
Copy link

@idea--list idea--list commented Aug 30, 2020

In Ambiq SDK (TARGET_SFE_ARTEMIS_THING_PLUS/bsp/am_bsp_pins.h) the pin for the on-board user button is already defined.
However in TARGET_SFE_ARTEMIS_THING_PLUS/PinNames.h there are no pin definitions for the on-board button, as a consequence in mbed-os we can not reference it by the name.

Following mbed-os pin naming conventions buttons have a pin name like SW1 (not like BUTTON1).
This PR adds a name reference to TARGET_SFE_ARTEMIS_THING_PLUS/PinNames.h so that we can use SW1 in mbed-os as an alias for the pin definition defined in the corresponding bsp.

I think only the Artemis Thing Plus has an on-board user button, so other boards might not be affected.

Summary of changes

Impact of changes

Migration actions required

Documentation


Pull request type

[] 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)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


…utton

In Ambiq SDK (TARGET_SFE_ARTEMIS_THING_PLUS/bsp/am_bsp_pins.h) the pin for the on-board user button is already defined.
However in TARGET_SFE_ARTEMIS_THING_PLUS/PinNames.h there are no pin definitions for the on-board button, as a consequence in mbed-os we can not reference it by the name.

Following mbed-os pin naming conventions buttons have a pin name like SW1 (not like BUTTON1).
This PR adds a name reference to TARGET_SFE_ARTEMIS_THING_PLUS/PinNames.h so that we can use SW1 in mbed-os as an alias for the pin definition defined in the corresponding bsp.

I think currently other Artemis boards also lack the mbed pin definition for the on-board button that already exists in the bsp.
@idea--list idea--list changed the title Update PinNames.h to also include the bsp definition of the onboard b… Update PinNames.h to include user button on the Thing Plus board Aug 30, 2020
@oclyke oclyke changed the base branch from ambiq-apollo3-dev to ambiq-apollo3-arduino September 3, 2020 01:02
@oclyke oclyke changed the base branch from ambiq-apollo3-arduino to ambiq-apollo3-dev September 3, 2020 01:03
Copy link

@oclyke oclyke 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 a great addition, thanks @idea--list!

@oclyke oclyke merged commit faee8c7 into sparkfun:ambiq-apollo3-dev Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants