| /* bttester.h - Bluetooth tester headers */ |
| |
| /* |
| * Copyright (c) 2015-2016 Intel Corporation |
| * Copyright (c) 2022 Codecoup |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| #include <zephyr/sys/util.h> |
| #include <zephyr/bluetooth/addr.h> |
| |
| #include "bttester.h" |
| #include "btp_core.h" |
| #include "btp_gap.h" |
| #include "btp_gatt.h" |
| #include "btp_l2cap.h" |
| #include "btp_mesh.h" |
| |
| #define BTP_MTU 1024 |
| #define BTP_DATA_MAX_SIZE (BTP_MTU - sizeof(struct btp_hdr)) |
| |
| #define BTP_INDEX_NONE 0xff |
| |
| #define BTP_SERVICE_ID_CORE 0 |
| #define BTP_SERVICE_ID_GAP 1 |
| #define BTP_SERVICE_ID_GATT 2 |
| #define BTP_SERVICE_ID_L2CAP 3 |
| #define BTP_SERVICE_ID_MESH 4 |
| |
| #define BTP_STATUS_SUCCESS 0x00 |
| #define BTP_STATUS_FAILED 0x01 |
| #define BTP_STATUS_UNKNOWN_CMD 0x02 |
| #define BTP_STATUS_NOT_READY 0x03 |
| |
| struct btp_hdr { |
| uint8_t service; |
| uint8_t opcode; |
| uint8_t index; |
| uint16_t len; |
| uint8_t data[]; |
| } __packed; |
| |
| #define BTP_STATUS 0x00 |
| struct btp_status { |
| uint8_t code; |
| } __packed; |