mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 09:41:03 +00:00
mesh: rename pb_type_t to mesh_pb_type_t, fixes #249
This commit is contained in:
parent
1483c79213
commit
30a044b095
@ -81,7 +81,7 @@ static mesh_provisioning_t mesh_provisioning;
|
|||||||
static void mesh_provisioning_service_emit_link_open(hci_con_handle_t con_handle, uint8_t status){
|
static void mesh_provisioning_service_emit_link_open(hci_con_handle_t con_handle, uint8_t status){
|
||||||
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
||||||
little_endian_store_16(event, 4, con_handle);
|
little_endian_store_16(event, 4, con_handle);
|
||||||
event[6] = PB_TYPE_GATT;
|
event[6] = MESH_PB_TYPE_GATT;
|
||||||
mesh_provisioning_service_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
mesh_provisioning_service_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ static void pb_adv_emit_pdu_sent(uint8_t status){
|
|||||||
static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_transport_cid){
|
static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_transport_cid){
|
||||||
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
||||||
little_endian_store_16(event, 4, pb_transport_cid);
|
little_endian_store_16(event, 4, pb_transport_cid);
|
||||||
event[6] = PB_TYPE_ADV;
|
event[6] = MESH_PB_TYPE_ADV;
|
||||||
pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,9 +85,9 @@ extern "C"
|
|||||||
#define MESH_INPUT_OOB_STRING 0x08
|
#define MESH_INPUT_OOB_STRING 0x08
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PB_TYPE_ADV = 0,
|
MESH_PB_TYPE_ADV = 0,
|
||||||
PB_TYPE_GATT
|
MESH_PB_TYPE_GATT
|
||||||
} pb_type_t;
|
} mesh_pb_type_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MESH_OOB_INFORMATION_INDEX_OTHER = 0,
|
MESH_OOB_INFORMATION_INDEX_OTHER = 0,
|
||||||
|
@ -150,17 +150,17 @@ typedef enum {
|
|||||||
|
|
||||||
static device_state_t device_state;
|
static device_state_t device_state;
|
||||||
static uint16_t pb_transport_cid;
|
static uint16_t pb_transport_cid;
|
||||||
static pb_type_t pb_type;
|
static mesh_pb_type_t pb_type;
|
||||||
|
|
||||||
static void pb_send_pdu(uint16_t transport_cid, const uint8_t * buffer, uint16_t buffer_size){
|
static void pb_send_pdu(uint16_t transport_cid, const uint8_t * buffer, uint16_t buffer_size){
|
||||||
switch (pb_type){
|
switch (pb_type){
|
||||||
#ifdef ENABLE_MESH_ADV_BEARER
|
#ifdef ENABLE_MESH_ADV_BEARER
|
||||||
case PB_TYPE_ADV:
|
case MESH_PB_TYPE_ADV:
|
||||||
pb_adv_send_pdu(transport_cid, buffer, buffer_size);
|
pb_adv_send_pdu(transport_cid, buffer, buffer_size);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MESH_GATT_BEARER
|
#ifdef ENABLE_MESH_GATT_BEARER
|
||||||
case PB_TYPE_GATT:
|
case MESH_PB_TYPE_GATT:
|
||||||
pb_gatt_send_pdu(transport_cid, buffer, buffer_size);
|
pb_gatt_send_pdu(transport_cid, buffer, buffer_size);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -172,12 +172,12 @@ static void pb_send_pdu(uint16_t transport_cid, const uint8_t * buffer, uint16_t
|
|||||||
static void pb_close_link(uint16_t transport_cid, uint8_t reason){
|
static void pb_close_link(uint16_t transport_cid, uint8_t reason){
|
||||||
switch (pb_type){
|
switch (pb_type){
|
||||||
#ifdef ENABLE_MESH_ADV_BEARER
|
#ifdef ENABLE_MESH_ADV_BEARER
|
||||||
case PB_TYPE_ADV:
|
case MESH_PB_TYPE_ADV:
|
||||||
pb_adv_close_link(transport_cid, reason);
|
pb_adv_close_link(transport_cid, reason);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MESH_GATT_BEARER
|
#ifdef ENABLE_MESH_GATT_BEARER
|
||||||
case PB_TYPE_GATT:
|
case MESH_PB_TYPE_GATT:
|
||||||
pb_gatt_close_link(transport_cid, reason);
|
pb_gatt_close_link(transport_cid, reason);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,7 +102,7 @@ static uint16_t pdu_size;
|
|||||||
static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_adv_cid){
|
static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_adv_cid){
|
||||||
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
|
||||||
little_endian_store_16(event, 4, pb_adv_cid);
|
little_endian_store_16(event, 4, pb_adv_cid);
|
||||||
event[6] = PB_TYPE_ADV;
|
event[6] = MESH_PB_TYPE_ADV;
|
||||||
pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user