Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
For our project we need to put the microbit in Central mode (BLE). As it is not possible to do this via the current drivers (S113) we would need to use the S140 drivers instead.
According to what we found on the different microbit repos (issue, pull-request, ...), it is difficult (impossible ?) to change the BLE drivers without modifying the whole compilation chain and impacting everyone.
To solve the problem we simply isolated the different use cases (S113 driver, S140 driver or no driver), in specific folders. Then the selection is done via the CMakeList.
Finally, to use the S140 drivers, you just need to add the line
"S140": 1
in the pxt.json of a microbit extension, otherwise the S113 driver will be used.Example of our "yotta part" in
pxt.json
file for the extension we are developing:For this change to be effective you must also accept PR of
codal-microbit-nrf5sdk
microbit-foundation/codal-microbit-nrf5sdk#15 .Some microbit users would like to have access to this feature (#212).
This solution has the advantage of not impacting current microbit users, as the operation remains the same, but offers the possibility of using the S140 drivers for more BLE functionality.
I hope I have made myself clear,
Jonathan