-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
subsys: bluetooth: pass information on report id in callbacks #19693
base: main
Are you sure you want to change the base?
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 4e7b2c17fc8be8c78bf1cdadef563a9199c2e75f more detailssdk-nrf:
Github labels
List of changed files detected by CI (2)
Outputs:ToolchainVersion: b77d8c1312 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
3239054
to
fe1e80f
Compare
* @param report_id Report ID defined in the HIDS Report Map. | ||
* @param evt Notification event. | ||
*/ | ||
typedef void (*bt_hids_notify_ext_handler_t) (uint8_t report_id, enum bt_hids_notify_evt evt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider deprecating the old approach to keep API simple. Similarly as here: #19692 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no deprecation - explained in the other PR
subsys/bluetooth/services/hids.c
Outdated
.data = buf, | ||
.size = rep->size, | ||
}; | ||
struct bt_hids_rep report = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extending struct bt_hids_rep
with uint8_t report_id
to keep the ID together with report data and to avoid changing the API. HID report ID is actually part of the HID report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is a good idea, let's switch to it
fe1e80f
to
691f179
Compare
Add information about report id in structure carried by callback function. Signed-off-by: Pawel Dunaj <[email protected]>
Add report identifier to input report notification callback. The old callback format is kept for backwards compatibility. Signed-off-by: Pawel Dunaj <[email protected]>
691f179
to
4e7b2c1
Compare
rebased |
Add information about report id as argument to the callbacks. The old callback format is kept for backwards compatibility.