szymon-czapracki commented on code in PR #1813:
URL: https://github.com/apache/mynewt-nimble/pull/1813#discussion_r1758895827
##########
apps/bttester/src/btp_bap.c:
##########
@@ -371,8 +449,169 @@ static const struct btp_handler handlers[] = {
.expect_len = sizeof(struct bap_bap_broadcast_source_stop_cmd),
.func = broadcast_source_stop,
},
+ {
+ .opcode = BTP_BAP_SET_BROADCAST_CODE,
+ .index = BTP_INDEX,
+ .expect_len = sizeof(struct btp_bap_set_broadcast_code_cmd),
+ .func = broadcast_code_set,
+ },
+ {
+ .opcode = BTP_BAP_BROADCAST_SINK_SETUP,
+ .index = BTP_INDEX,
+ .expect_len = 0,
+ .func = broadcast_sink_setup,
+ },
+ {
+ .opcode = BTP_BAP_BROADCAST_SINK_STOP,
+ .index = BTP_INDEX,
+ .expect_len = sizeof(struct btp_bap_broadcast_sink_stop_cmd),
+ .func = broadcast_sink_stop,
+ },
};
+#define BROADCAST_SINK_PA_SYNC_TIMEOUT_DEFAULT 0x07D0
+
+static int
+broadcast_sink_pa_sync_params_get(struct ble_gap_periodic_sync_params *params)
+{
+ params->skip = 0;
+ params->sync_timeout = BROADCAST_SINK_PA_SYNC_TIMEOUT_DEFAULT;
+ params->reports_disabled = false;
+
+ return 0;
+}
+
+static int
+broadcast_sink_disc_start(const struct ble_gap_ext_disc_params *params)
+{
+ uint8_t own_addr_type;
+ int rc;
+
+ /* Figure out address to use while scanning. */
+ rc = ble_hs_id_infer_auto(0, &own_addr_type);
+ if (rc != 0) {
+ console_printf("determining own address type failed (%d)", rc);
Review Comment:
Added __func__ to make this less generic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]