Skip to content

Commit 75a3ec3

Browse files
szymon-czaprackisjanc
authored andcommitted
apps: bttester: Remove set_mult support
This command has no corresponding auto-pts procedure. Notify is now utilized via function specially designed for notify purpose.
1 parent ca51138 commit 75a3ec3

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

apps/bttester/src/btp/btp_gatt.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,6 @@ struct btp_gatt_change_database_cmd {
314314
uint8_t visibility;
315315
} __packed;
316316

317-
#define BTP_GATT_SET_MULT_VALUE 0x20
318-
struct btp_gatt_set_mult_val_cmd {
319-
uint16_t count;
320-
uint8_t data[0];
321-
} __packed;
322-
323317
#define BTP_GATT_NOTIFY_MULTIPLE 0x21
324318
struct btp_gatt_notify_mult_val_cmd {
325319
ble_addr_t addr;

apps/bttester/src/btp_gatt.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,49 +1907,6 @@ notify_multiple(uint16_t conn_handle, void *arg)
19071907
return rc;
19081908
}
19091909

1910-
static uint8_t
1911-
set_mult(const void *cmd, uint16_t cmd_len,
1912-
void *rsp, uint16_t *rsp_len)
1913-
{
1914-
const struct btp_gatt_set_mult_val_cmd *cp = cmd;
1915-
struct ble_gatt_notif tuples[16];
1916-
int i;
1917-
int rc = 0;
1918-
int data_idx = 0;
1919-
uint16_t data_len;
1920-
struct notify_mult_cb_data cb_data;
1921-
1922-
for (i = 0; i < cp->count; i++) {
1923-
tuples[i].handle = get_le16(cp->data + data_idx);
1924-
data_idx += 2;
1925-
tuples[i].value = ble_hs_mbuf_att_pkt();
1926-
if (tuples[i].value == NULL) {
1927-
rc = ENOMEM;
1928-
goto done;
1929-
}
1930-
1931-
data_len = get_le16(cp->data + data_idx);
1932-
data_idx += 2;
1933-
1934-
os_mbuf_append(tuples[i].value, cp->data + data_idx, data_len);
1935-
data_idx += data_len;
1936-
}
1937-
1938-
for (i = 0; i < cp->count; i++) {
1939-
ble_att_svr_write_local(tuples[i].handle, tuples[i].value);
1940-
cb_data.handles[i] = tuples[i].handle;
1941-
}
1942-
1943-
cb_data.tuple_cnt = cp->count;
1944-
ble_gap_conn_foreach_handle(notify_multiple, (void *)&cb_data);
1945-
done:
1946-
if (rc != 0) {
1947-
return BTP_STATUS_FAILED;
1948-
}
1949-
1950-
return BTP_STATUS_SUCCESS;
1951-
}
1952-
19531910
static uint8_t
19541911
notify_mult(const void *cmd, uint16_t cmd_len,
19551912
void *rsp, uint16_t *rsp_len)
@@ -2164,11 +2121,6 @@ static const struct btp_handler handlers[] = {
21642121
.expect_len = sizeof(struct btp_gatt_get_attribute_value_cmd),
21652122
.func = get_attr_val,
21662123
},
2167-
{
2168-
.opcode = BTP_GATT_SET_MULT_VALUE,
2169-
.expect_len = BTP_HANDLER_LENGTH_VARIABLE,
2170-
.func = set_mult,
2171-
},
21722124
{
21732125
.opcode = BTP_GATT_NOTIFY_MULTIPLE,
21742126
.expect_len = BTP_HANDLER_LENGTH_VARIABLE,

0 commit comments

Comments
 (0)