Unverified Commit 26438d4d authored by Bjørn Inge Hanssen's avatar Bjørn Inge Hanssen Committed by GitHub
Browse files

Merge pull request #55 from NordicSemiconductor/csharp

Merge header file changes
parents a70e5dc1 5c47a8a8
......@@ -170,7 +170,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which this event occurred. */
union
union common_evt_params_union
{
ble_evt_tx_complete_t tx_complete; /**< Transmission Complete. */
ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */
......@@ -189,7 +189,7 @@ typedef struct
typedef struct
{
ble_evt_hdr_t header; /**< Event header. */
union
union evt_union
{
ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */
ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */
......
......@@ -662,8 +662,8 @@ typedef struct
typedef struct
{
uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
@ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */
} ble_gap_evt_passkey_display_t;
......@@ -683,7 +683,7 @@ typedef struct
/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */
typedef struct
{
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
ble_gap_lesc_p256_pk_t *p_pk_peer; /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory
inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */
uint8_t oobd_req :1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the procedure. */
} ble_gap_evt_lesc_dhkey_request_t;
......@@ -723,7 +723,7 @@ typedef struct
ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */
ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */
ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
ble_gap_lesc_p256_pk_t *p_pk; /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the value defined
in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */
} ble_gap_sec_keys_t;
......@@ -812,7 +812,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which event occurred. */
union /**< union alternative identified by evt_id in enclosing struct. */
union gap_evt_params_union /**< union alternative identified by evt_id in enclosing struct. */
{
ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */
ble_gap_evt_disconnected_t disconnected; /**< Disconnected Event Parameters. */
......@@ -1078,7 +1078,7 @@ SD_RPC_API uint32_t sd_ble_gap_address_get(adapter_t *adapter, ble_gap_addr_t *p
* @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data type.
* @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied.
*/
SD_RPC_API uint32_t sd_ble_gap_adv_data_set(adapter_t *adapter, uint8_t const *p_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen);
SD_RPC_API uint32_t sd_ble_gap_adv_data_set(adapter_t *adapter, uint8_t const *p_adv_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen);
/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).
......@@ -1276,7 +1276,7 @@ SD_RPC_API uint32_t sd_ble_gap_device_name_set(adapter_t *adapter, ble_gap_conn_
* @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.
* @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.
*/
SD_RPC_API uint32_t sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_len);
SD_RPC_API uint32_t sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_dev_len);
/**@brief Initiate the GAP Authentication procedure.
......@@ -1370,8 +1370,8 @@ SD_RPC_API uint32_t sd_ble_gap_authenticate(adapter_t *adapter, uint16_t conn_ha
* @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.
* @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be set to NULL, as the parameters have
* already been provided during a previous call to @ref sd_ble_gap_authenticate.
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or distributed as a result of the ongoing security procedure
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
* upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.
* Note that the SoftDevice expects the application to provide memory for storing the
* peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key
......
/*
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* 4. This software must only be used in a processor manufactured by Nordic
* Semiconductor ASA, or in a processor manufactured by a third party that
* is used in combination with a processor manufactured by Nordic Semiconductor.
*
*
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
......@@ -31,7 +31,7 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
/**
......@@ -170,7 +170,8 @@ typedef struct
typedef struct
{
uint16_t handle; /**< Attribute handle. */
union {
union gattc_attr_info_union
{
ble_uuid_t uuid16; /**< 16-bit Attribute UUID. */
ble_uuid128_t uuid128; /**< 128-bit Attribute UUID. */
} info;
......@@ -218,10 +219,10 @@ typedef struct
} ble_gattc_evt_attr_info_disc_rsp_t;
/**@brief GATT read by UUID handle value pair. */
typedef struct
typedef struct
{
uint16_t handle; /**< Attribute Handle. */
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
uint8_t *p_value; /**< Pointer to value, variable length (length available as value_len in @ref ble_gattc_evt_char_val_by_uuid_read_rsp_t).
Please note that this pointer is absolute to the memory provided by the user when retrieving the event,
so it will effectively point to a location inside the handle_value array. */
} ble_gattc_handle_value_t;
......@@ -286,7 +287,7 @@ typedef struct
uint16_t conn_handle; /**< Connection Handle on which event occured. */
uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */
uint16_t error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */
union
union gattc_evt_params_union
{
ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */
ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */
......@@ -308,7 +309,7 @@ typedef struct
/**@brief Initiate or continue a GATT Primary Service Discovery procedure.
*
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
* If the last service has not been reached, this function must be called again with an updated start handle value to continue the search.
*
* @note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with
......@@ -317,11 +318,11 @@ typedef struct
* @events
* @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] start_handle Handle to start searching from.
* @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned.
......@@ -343,11 +344,11 @@ SD_RPC_API uint32_t sd_ble_gattc_primary_services_discover(adapter_t *adapter, u
* @events
* @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_REL_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
......@@ -376,7 +377,7 @@ SD_RPC_API uint32_t sd_ble_gattc_relationships_discover(adapter_t *adapter, uint
* @mscs
* @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
*
......@@ -401,7 +402,7 @@ SD_RPC_API uint32_t sd_ble_gattc_characteristics_discover(adapter_t *adapter, ui
* @mscs
* @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on.
*
......@@ -422,11 +423,11 @@ SD_RPC_API uint32_t sd_ble_gattc_descriptors_discover(adapter_t *adapter, uint16
* @events
* @event{BLE_GATTC_EVT_DESC_DISC_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_UUID_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_uuid Pointer to a Characteristic value UUID to read.
* @param[in] p_handle_range A pointer to the range of handles to perform this procedure on.
......@@ -443,17 +444,17 @@ SD_RPC_API uint32_t sd_ble_gattc_char_value_by_uuid_read(adapter_t *adapter, uin
/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure.
*
* @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
* complete value.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute to be read.
* @param[in] offset Offset into the attribute value to be read.
......@@ -468,16 +469,16 @@ SD_RPC_API uint32_t sd_ble_gattc_read(adapter_t *adapter, uint16_t conn_handle,
/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.
*
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
*
* @events
* @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_READ_MULT_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.
* @param[in] handle_count The number of handles in p_handles.
......@@ -493,24 +494,24 @@ SD_RPC_API uint32_t sd_ble_gattc_char_values_read(adapter_t *adapter, uint16_t c
/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure.
*
* @details This function can perform all write procedures described in GATT.
* @details This function can perform all write procedures described in GATT.
*
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
* generate a @ref BLE_EVT_TX_COMPLETE event when the packet has been transmitted. A write (with response) on the other hand will use the
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
* has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details.
*
* @events
* @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.}
* @endevents
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}
* @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}
* @mmsc{@ref BLE_COMMON_APP_BUFF_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] p_write_params A pointer to a write parameters structure.
*
......@@ -527,11 +528,11 @@ SD_RPC_API uint32_t sd_ble_gattc_write(adapter_t *adapter, uint16_t conn_handle,
/**@brief Send a Handle Value Confirmation to the GATT Server.
*
*
* @mscs
* @mmsc{@ref BLE_GATTC_HVI_MSC}
* @endmscs
*
*
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
* @param[in] handle The handle of the attribute in the indication.
*
......
......@@ -281,7 +281,8 @@ typedef struct
typedef struct
{
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
union {
union gatts_rw_authorize_reply_params_union
{
ble_gatts_authorize_params_t read; /**< Read authorization parameters. */
ble_gatts_authorize_params_t write; /**< Write authorization parameters. */
} params; /**< Reply Parameters. */
......@@ -314,7 +315,8 @@ typedef struct
typedef struct
{
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
union {
union gatts_evt_rw_authorize_request_union
{
ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */
ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */
} request; /**< Request Parameters. */
......@@ -344,7 +346,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which the event occurred. */
union
union gatts_evt_union
{
ble_gatts_evt_write_t write; /**< Write Event Parameters. */
ble_gatts_evt_rw_authorize_request_t authorize_request; /**< Read or Write Authorize Request Parameters. */
......@@ -688,7 +690,7 @@ SD_RPC_API uint32_t sd_ble_gatts_sys_attr_set(adapter_t *adapter, uint16_t conn_
* @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer.
* @retval ::NRF_ERROR_NOT_FOUND No system attributes found.
*/
SD_RPC_API uint32_t sd_ble_gatts_sys_attr_get(adapter_t *adapter, uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags);
SD_RPC_API uint32_t sd_ble_gatts_sys_attr_get(adapter_t *adapter, uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_sys_attr_data_len, uint32_t flags);
/**@brief Retrieve the first valid user attribute handle.
......
......@@ -120,7 +120,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which event occured. */
union
union l2cap_evt_params_union
{
ble_l2cap_evt_rx_t rx; /**< RX Event parameters. */
} params; /**< Event Parameters. */
......@@ -191,7 +191,7 @@ SD_RPC_API uint32_t sd_ble_l2cap_cid_unregister(adapter_t *adapter, uint16_t cid
* @retval ::BLE_ERROR_NO_TX_PACKETS Not enough application packets available.
* @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, see @ref BLE_L2CAP_MTU_DEF.
*/
SD_RPC_API uint32_t sd_ble_l2cap_tx(adapter_t *adapter, uint16_t conn_handle, ble_l2cap_header_t const *p_header, uint8_t const *p_data);
SD_RPC_API uint32_t sd_ble_l2cap_tx(adapter_t *adapter, uint16_t conn_handle, ble_l2cap_header_t const *p_header, uint8_t const *p_tx_data);
/** @} */
......
......@@ -195,7 +195,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which this event occurred. */
union
union common_evt_params_union
{
ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */
ble_evt_user_mem_release_t user_mem_release; /**< User Memory Release Event Parameters. */
......@@ -213,7 +213,7 @@ typedef struct
typedef struct
{
ble_evt_hdr_t header; /**< Event header. */
union
union evt_union
{
ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */
ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */
......@@ -316,7 +316,8 @@ typedef struct
uint8_t conn_cfg_tag; /**< The application chosen tag it can use with the @ref sd_ble_gap_adv_start() and @ref sd_ble_gap_connect()
calls to select this configuration when creating a connection.
Must be different for all connection configurations added and not @ref BLE_CONN_CFG_TAG_DEFAULT. */
union {
union conn_cfg_params_union
{
ble_gap_conn_cfg_t gap_conn_cfg; /**< GAP connection configuration, cfg_id is @ref BLE_CONN_CFG_GAP. */
ble_gattc_conn_cfg_t gattc_conn_cfg; /**< GATTC connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTC. */
ble_gatts_conn_cfg_t gatts_conn_cfg; /**< GATTS connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTS. */
......
......@@ -983,7 +983,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which event occurred. */
union /**< union alternative identified by evt_id in enclosing struct. */
union gap_evt_params_union /**< union alternative identified by evt_id in enclosing struct. */
{
ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */
ble_gap_evt_disconnected_t disconnected; /**< Disconnected Event Parameters. */
......@@ -1434,7 +1434,7 @@ SVCALL(SD_BLE_GAP_PRIVACY_GET, uint32_t, sd_ble_gap_privacy_get(adapter_t *adapt
* @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data type.
* @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied.
*/
SVCALL(SD_BLE_GAP_ADV_DATA_SET, uint32_t, sd_ble_gap_adv_data_set(adapter_t *adapter, uint8_t const *p_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen));
SVCALL(SD_BLE_GAP_ADV_DATA_SET, uint32_t, sd_ble_gap_adv_data_set(adapter_t *adapter, uint8_t const *p_adv_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen));
/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).
......@@ -1629,7 +1629,7 @@ SVCALL(SD_BLE_GAP_DEVICE_NAME_SET, uint32_t, sd_ble_gap_device_name_set(adapter_
* @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.
* @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.
*/
SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_len));
SVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_dev_name_len));
/**@brief Initiate the GAP Authentication procedure.
......
......@@ -235,7 +235,8 @@ typedef struct
{
uint16_t count; /**< Attribute count. */
uint8_t format; /**< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT. */
union {
union gattc_attr_info_union
{
ble_gattc_attr_info16_t attr_info16[1]; /**< Attribute information for 16-bit Attribute UUID.
@note This is a variable length array. The size of 1 indicated is only a placeholder for compilation.
See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */
......@@ -325,7 +326,7 @@ typedef struct
uint16_t conn_handle; /**< Connection Handle on which event occurred. */
uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */
uint16_t error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */
union
union gattc_evt_union
{
ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */
ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */
......
......@@ -306,7 +306,8 @@ typedef struct
typedef struct
{
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
union {
union gatts_rw_authorize_reply_params_union
{
ble_gatts_authorize_params_t read; /**< Read authorization parameters. */
ble_gatts_authorize_params_t write; /**< Write authorization parameters. */
} params; /**< Reply Parameters. */
......@@ -363,7 +364,8 @@ typedef struct
typedef struct
{
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
union {
union gatts_evt_rw_authorize_request_union
{
ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */
ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */
} request; /**< Request Parameters. */
......@@ -404,7 +406,7 @@ typedef struct
typedef struct
{
uint16_t conn_handle; /**< Connection Handle on which the event occurred. */
union
union gatts_evt_params_union
{
ble_gatts_evt_write_t write; /**< Write Event Parameters. */
ble_gatts_evt_rw_authorize_request_t authorize_request; /**< Read or Write Authorize Request Parameters. */
......@@ -770,7 +772,7 @@ SVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t, sd_ble_gatts_sys_attr_set(adapter_t
* @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer.
* @retval ::NRF_ERROR_NOT_FOUND No system attributes found.
*/
SVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t, sd_ble_gatts_sys_attr_get(adapter_t *adapter, uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags));
SVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t, sd_ble_gatts_sys_attr_get(adapter_t *adapter, uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_sys_attr_data_len, uint32_t flags));
/**@brief Retrieve the first valid user attribute handle.
......
......@@ -287,7 +287,7 @@ typedef struct
uint16_t conn_handle; /**< Connection Handle on which the event occured. */
uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or
@ref BLE_L2CAP_CID_INVALID if not present. */
union
union l2cap_evt_params_union
{
ble_l2cap_evt_ch_setup_request_t ch_setup_request; /**< L2CAP Channel Setup Request Event Parameters. */
ble_l2cap_evt_ch_setup_refused_t ch_setup_refused; /**< L2CAP Channel Setup Refused Event Parameters. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment