Skip to content

Use critical section, not lock, in CharacteristicBuffer; use a root pointer for ble_drv list #1581

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

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

dhalbert
Copy link
Collaborator

Two problems with BLE:

  • Used a lock instead of critical section in an interrupt routine, causing a deadlock.
  • Needed to make the ble_drv linked list start with a root pointer. Its allocated storage was getting gc'd and reused.

I reordered some #include's for clarity, but the order doesn't matter (I thought it did).

Partly fixes #1568. The other part is adafruit/Adafruit_CircuitPython_BluefruitConnect#10.

@dhalbert dhalbert requested review from tannewt and kattni February 21, 2019 05:30
@dhalbert
Copy link
Collaborator Author

@kattni you can test this in combination with adafruit/Adafruit_CircuitPython_BluefruitConnect#10.

Copy link

@kattni kattni left a comment

Choose a reason for hiding this comment

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

Tested successfully with update found here: adafruit/Adafruit_CircuitPython_BluefruitConnect#10

Works great! Thank you for doing this!

@kattni kattni merged commit f3e50b9 into adafruit:master Feb 21, 2019
@dhalbert dhalbert deleted the ble-drv-root-pointer branch February 21, 2019 17:46
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.

Connection dropping with BLE Connect app when printing mobile data streams
2 participants