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

subsys: bluetooth: pass information on report id in callbacks #19693

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pdunaj
Copy link
Contributor

@pdunaj pdunaj commented Dec 20, 2024

Add information about report id as argument to the callbacks. The old callback format is kept for backwards compatibility.

@pdunaj pdunaj requested review from a team as code owners December 20, 2024 13:56
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 20, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 20, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 4

Inputs:

Sources:

sdk-nrf: PR head: 4e7b2c17fc8be8c78bf1cdadef563a9199c2e75f

more details

sdk-nrf:

PR head: 4e7b2c17fc8be8c78bf1cdadef563a9199c2e75f
merge base: 1133ff3eb088ec3b3082b2e52a392aa85c577707
target head (main): eb830e673334c195331671dc4f0fb467437c136b
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (2)
include
│  ├── bluetooth
│  │  ├── services
│  │  │  │ hids.h
subsys
│  ├── bluetooth
│  │  ├── services
│  │  │  │ hids.c

Outputs:

Toolchain

Version: b77d8c1312
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:b77d8c1312_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 856
  • ❌ Integration tests
    • ✅ desktop52_verification
    • ❌ test_ble_nrf_config
    • ✅ test-fw-nrfconnect-ble_samples
    • ✅ test-sdk-find-my
Disabled integration tests
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

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.

@pdunaj pdunaj force-pushed the hids_callback_with_rid branch from 3239054 to fe1e80f Compare December 20, 2024 14:59
@pdunaj pdunaj requested a review from MarekPieta December 20, 2024 15:00
* @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);
Copy link
Contributor

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)

Copy link
Contributor Author

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

.data = buf,
.size = rep->size,
};
struct bt_hids_rep report = {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@pdunaj pdunaj force-pushed the hids_callback_with_rid branch from fe1e80f to 691f179 Compare January 8, 2025 12:33
pdunaj added 2 commits January 8, 2025 13:33
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]>
@pdunaj pdunaj force-pushed the hids_callback_with_rid branch from 691f179 to 4e7b2c1 Compare January 8, 2025 12:34
@pdunaj
Copy link
Contributor Author

pdunaj commented Jan 8, 2025

rebased

@pdunaj pdunaj requested a review from MarekPieta January 9, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants