-
Notifications
You must be signed in to change notification settings - Fork 3k
BlueNRG-MS: Use non Arduino Uno pin names #14829
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
Conversation
The Arduino Uno pin aliases in `hal/PinNameAliases.h` are now guarded by the macro `TARGET_FF_ARDUINO_UNO` (since 7c333d8) and not globally available anymore. This results in the following error (and similar ones) when building the driver for K64F: error: 'ARDUINO_UNO_SPI_MOSI' was not declared in this scope To fix it, replace the aliases with their raw pin names. Now the pins are identical to BlueNRG-2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should correct K64F...
Why then BlueNRG2 uses D/A pin names? What is the difference ?
Were they available for K64F? I don't see |
@jeromecoutant Do you mean use Arduino pins by default, and override K64F to not use it? Or enable @ARMmbed/mbed-os-hal We have two form factors in |
"SPI_RESET": "ARDUINO_UNO_D7", | ||
"SPI_IRQ": "ARDUINO_UNO_A0", | ||
"SPI_SCK": "ARDUINO_UNO_D3", | ||
"SPI_MOSI": "D11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, hardcoding this to D11, how to overwrite it as this is acomponent to be used by other targets. It was chosen to be usable with arduino uno. A question is, shouldn't this be a specific config and available to be overriden by a target?
"SPI_MOSI": "MBED_CONF_BLUENRG_MOSI", etc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mbed_lib.json
is the very place to generate MBED_CONF_..., so we shouldn't reference MBED_CONF_... in mbed_lib.json
. The field target_overrides
is the exact place for overriding pins per target.
In my opinion, providing defaults still makes sense. This is convenient for targets supporting a common form factor (e.g. ARDUINO_UNO) so they don't need any overrides.
This is a question for @apalmieriGH and @ARMmbed/mbed-os-connectivity who added BlueNRG 2 support.
As per my inline comment, the Uno pins were available (probably by mistake to both ARDUINO_UNO and ARDUINO form factors, before 7c333d8. |
K64F needs to migrate to the standard Arduino Uno pin names - see docs
|
Thanks for clarification. I think the fix would then be migrating K64F to ARDUINO_UNO. Is that easy to do? I'm closing this PR, but until it's fixed this issue blocks Travis CI of mbed-tools. |
Summary of changes
The Arduino Uno pin aliases in
hal/PinNameAliases.h
are now guarded by the macroTARGET_FF_ARDUINO_UNO
(since 7c333d8) and not globally available anymore. This results in the following error (and similar ones) when building the driver for K64F:To fix it, replace the aliases with their raw pin names. Now the pins are identical to BlueNRG-2.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Manual testing: compile
mbed-os-example-ble/BLE_Advertising
for K64F.Reviewers
@ARMmbed/mbed-os-connectivity