Skip to content
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

Patch 1 - fix pipe errors on write(), fix write() return for println(), turn off BLE_RW_DEBUG #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

neilsunw
Copy link

Fix pipe errors on write() -- error 0x91-- credit tracking fixes
Removed delay(35) in write() -- not needed with credit checking
Fix write(buffer,len) return code -- fixes println()
Turned off BLE_RW_DEBUG

NBP (2/21/2015): Modified to fix pipe errors on Adafruit_BLE_UART::write()
                   pipe error 0x91 "ACI_STATUS_ERROR_CREDIT_NOT_AVAILABLE"
* write() added check of aci_state.data_credit_available along with lib_aci_is_pipe_available()
    before calling lib_aci_send_data() -- credit was going below 0 (wrap around to 255)
* Added missing break in pollACI() after case ACI_EVT_CONNECTED block.
* pollACI() case ACI_EVT_PIPE_ERROR removed credit increment, let ACI_EVT_DATA_CREDIT do it.
* write() removed delay(35), not needed with credit check fixes.
    Seems to also reduce transmission losses -- allows for more pollACI() calls (?)
    len -= bytesThisPass; // NBP (2/22/2015) fix for return value, no break, also fixes println()
@neilsunw neilsunw changed the title Patch 1 Patch 1 - fix pipe errors on write(), fix write() return for println(), turn off BLE_RW_DEBUG Feb 23, 2015
@microbuilder
Copy link
Contributor

Thanks for the pull request ... I'll have to properly test this out before we can merge it, but it looks good browsing the code.

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.

2 participants