mesh: rename pb_type_t to mesh_pb_type_t, fixes #249

This commit is contained in:
Milanka Ringwald 2019-09-09 17:23:43 +02:00
parent 1483c79213
commit 30a044b095
5 changed files with 11 additions and 11 deletions

View File

@ -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){
uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status};
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));
}

View File

@ -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){
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);
event[6] = PB_TYPE_ADV;
event[6] = MESH_PB_TYPE_ADV;
pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event));
}

View File

@ -85,9 +85,9 @@ extern "C"
#define MESH_INPUT_OOB_STRING 0x08
typedef enum {
PB_TYPE_ADV = 0,
PB_TYPE_GATT
} pb_type_t;
MESH_PB_TYPE_ADV = 0,
MESH_PB_TYPE_GATT
} mesh_pb_type_t;
typedef enum {
MESH_OOB_INFORMATION_INDEX_OTHER = 0,

View File

@ -150,17 +150,17 @@ typedef enum {
static device_state_t device_state;
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){
switch (pb_type){
#ifdef ENABLE_MESH_ADV_BEARER
case PB_TYPE_ADV:
case MESH_PB_TYPE_ADV:
pb_adv_send_pdu(transport_cid, buffer, buffer_size);
break;
#endif
#ifdef ENABLE_MESH_GATT_BEARER
case PB_TYPE_GATT:
case MESH_PB_TYPE_GATT:
pb_gatt_send_pdu(transport_cid, buffer, buffer_size);
break;
#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){
switch (pb_type){
#ifdef ENABLE_MESH_ADV_BEARER
case PB_TYPE_ADV:
case MESH_PB_TYPE_ADV:
pb_adv_close_link(transport_cid, reason);
break;
#endif
#ifdef ENABLE_MESH_GATT_BEARER
case PB_TYPE_GATT:
case MESH_PB_TYPE_GATT:
pb_gatt_close_link(transport_cid, reason);
break;
#endif

View File

@ -102,7 +102,7 @@ static uint16_t pdu_size;
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};
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));
}