diff --git a/ble/att_server.h b/ble/att_server.h index b9ca8e4d5..b9ae9acac 100644 --- a/ble/att_server.h +++ b/ble/att_server.h @@ -39,6 +39,10 @@ #include #include "att.h" +#if defined __cplusplus +extern "C" { +#endif + /* * @brief setup ATT server * @param db attribute database created by compile-gatt.ph @@ -68,3 +72,7 @@ void att_server_notify(uint16_t handle, uint8_t *value, uint16_t value_len); * @brief indicate value change to client. client is supposed to reply with an indication_response */ void att_server_indicate(uint16_t handle, uint8_t *value, uint16_t value_len); + +#if defined __cplusplus +} +#endif diff --git a/ble/central_device_db.h b/ble/central_device_db.h index d882b0828..63660e9d1 100644 --- a/ble/central_device_db.h +++ b/ble/central_device_db.h @@ -38,6 +38,10 @@ #include +#if defined __cplusplus +extern "C" { +#endif + /** A Central Device DB is only required for signed writes diff --git a/ble/gap_le.h b/ble/gap_le.h index a48569b06..1590869fe 100644 --- a/ble/gap_le.h +++ b/ble/gap_le.h @@ -36,6 +36,10 @@ #pragma once +#if defined __cplusplus +extern "C" { +#endif + typedef enum { GAP_RANDOM_ADDRESS_TYPE_OFF = 0, GAP_RANDOM_ADDRESS_NON_RESOLVABLE, @@ -54,4 +58,7 @@ void gap_random_address_set_mode(gap_random_address_type_t random_address_type); */ void gap_random_address_set_update_period(int period_ms); +#if defined __cplusplus +} +#endif