Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Feb 21, 2020

Fixes #2646.

Uses MICROPY_MODULE_BUILTIN_INIT mechanism to call a native module __init__() function when the _bleio module is imported. The init function enables the Adapter, which enables the SD. This mechanism was disabled in all our ports before this PR, but might come in handy in other cases.

Also fixed one minor doc thing I found by accident.

@dhalbert dhalbert requested a review from tannewt February 21, 2020 02:58
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Great solution! I hadn't seen the module __init__ mechanic.

@tannewt tannewt merged commit e9ade63 into adafruit:master Feb 21, 2020
@dhalbert dhalbert deleted the enable-bleio-adapter-on-import branch February 21, 2020 19:12
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.

PR #2644 (disable remote editing) is breaking BLE
2 participants