pb_adv.c (f843ee5dd2e57b7251eddfd1e4b0f98f8b1e1e79) | pb_adv.c (30a044b0956c3be1f387e2fa8623a84a01cef70d) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 130 unchanged lines hidden (view full) --- 139static void pb_adv_emit_pdu_sent(uint8_t status){ 140 uint8_t event[] = { HCI_EVENT_MESH_META, 2, MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT, status}; 141 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); 142} 143 144static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_transport_cid){ 145 uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status}; 146 little_endian_store_16(event, 4, pb_transport_cid); | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 130 unchanged lines hidden (view full) --- 139static void pb_adv_emit_pdu_sent(uint8_t status){ 140 uint8_t event[] = { HCI_EVENT_MESH_META, 2, MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT, status}; 141 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); 142} 143 144static void pb_adv_emit_link_open(uint8_t status, uint16_t pb_transport_cid){ 145 uint8_t event[7] = { HCI_EVENT_MESH_META, 5, MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN, status}; 146 little_endian_store_16(event, 4, pb_transport_cid); |
147 event[6] = PB_TYPE_ADV; | 147 event[6] = MESH_PB_TYPE_ADV; |
148 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); 149} 150 151static void pb_adv_emit_link_close(uint16_t pb_transport_cid, uint8_t reason){ 152 uint8_t event[6] = { HCI_EVENT_MESH_META, 3, MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED}; 153 little_endian_store_16(event, 3, pb_transport_cid); 154 event[5] = reason; 155 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); --- 480 unchanged lines hidden --- | 148 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); 149} 150 151static void pb_adv_emit_link_close(uint16_t pb_transport_cid, uint8_t reason){ 152 uint8_t event[6] = { HCI_EVENT_MESH_META, 3, MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED}; 153 little_endian_store_16(event, 3, pb_transport_cid); 154 event[5] = reason; 155 pb_adv_packet_handler(HCI_EVENT_PACKET, 0, event, sizeof(event)); --- 480 unchanged lines hidden --- |