-
Notifications
You must be signed in to change notification settings - Fork 12
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
[BLE] enable use of local APDU buffer #403
Conversation
Tested as applied on API_LEVEL_5 on a Nano X 2.2.2, on |
Hello, |
@sportron-ledger it allows disabling parts of the code that require specific dependencies on |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #403 +/- ##
=======================================
Coverage 69.33% 69.33%
=======================================
Files 11 11
Lines 874 874
=======================================
Hits 606 606
Misses 268 268
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e45dc45
to
c275867
Compare
Description
This PR primarily submits changes to match its use in the Rust SDK.
The use of
HAVE_LOCAL_APDU_BUFFER
meansG_io_apdu_buffer
does not exist anymore and a way to know where to copy received commands is put in place. An additional pointer is added to the main BLE context, and all copies to the global apdu buffer are replaced with copies to this new pointer.Its value and associated length can be set externally through a new function. The use of
G_io_seproxyhal_spi_buffer
is also replaced with locals where possible to ease tracking data moves.To make sure bindings to the C APIs are correct, the use of
const
was enforced were necessary, sometimes requiring modifying the code a bit (see theDEF1
channel ID copy that was moved).Functions that enable BLE pairing while in an app were gated so that they can be deactivated, which allows not having to link in
snprintf
and other functions from another module (ux)Changes include