diff --git a/src/hci.h b/src/hci.h index 60d65fb77..0d24c3e5a 100644 --- a/src/hci.h +++ b/src/hci.h @@ -48,6 +48,10 @@ #include #include +#if defined __cplusplus +extern "C" { +#endif + // packet header lenghts #define HCI_CMD_DATA_PKT_HDR 0x03 #define HCI_ACL_DATA_PKT_HDR 0x04 @@ -261,3 +265,7 @@ void hci_emit_hci_open_failed(); void hci_emit_btstack_version(); void hci_emit_system_bluetooth_enabled(uint8_t enabled); void hci_emit_remote_name_cached(bd_addr_t *addr, device_name_t *name); + +#if defined __cplusplus +} +#endif diff --git a/src/hci_transport.h b/src/hci_transport.h index 9c49c8e15..539b2aa3c 100644 --- a/src/hci_transport.h +++ b/src/hci_transport.h @@ -42,6 +42,10 @@ #include #include +#if defined __cplusplus +extern "C" { +#endif + /* HCI packet types */ typedef struct { int (*open)(void *transport_config); @@ -69,4 +73,7 @@ extern hci_transport_t * hci_transport_h4_instance(); extern hci_transport_t * hci_transport_h5_instance(); extern hci_transport_t * hci_transport_usb_instance(); +#if defined __cplusplus +} +#endif diff --git a/src/l2cap.h b/src/l2cap.h index 4297024c2..dc409ad41 100644 --- a/src/l2cap.h +++ b/src/l2cap.h @@ -44,6 +44,10 @@ #include #include +#if defined __cplusplus +extern "C" { +#endif + #define L2CAP_SIG_ID_INVALID 0 typedef enum { @@ -130,3 +134,7 @@ void l2cap_decline_connection_internal(uint16_t local_cid, uint8_t reason); void l2cap_emit_channel_opened(l2cap_channel_t *channel, uint8_t status); void l2cap_emit_channel_closed(l2cap_channel_t *channel); void l2cap_emit_connection_request(l2cap_channel_t *channel); + +#if defined __cplusplus +} +#endif