Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 26438d4

Browse files
authored
Merge pull request #55 from NordicSemiconductor/csharp
Merge header file changes
2 parents a70e5dc + 5c47a8a commit 26438d4

10 files changed

Lines changed: 73 additions & 66 deletions

File tree

src/sd_api_v2/sdk/components/softdevice/s132/headers/ble.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ typedef struct
170170
typedef struct
171171
{
172172
uint16_t conn_handle; /**< Connection Handle on which this event occurred. */
173-
union
173+
union common_evt_params_union
174174
{
175175
ble_evt_tx_complete_t tx_complete; /**< Transmission Complete. */
176176
ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */
@@ -189,7 +189,7 @@ typedef struct
189189
typedef struct
190190
{
191191
ble_evt_hdr_t header; /**< Event header. */
192-
union
192+
union evt_union
193193
{
194194
ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */
195195
ble_gap_evt_t gap_evt; /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */

src/sd_api_v2/sdk/components/softdevice/s132/headers/ble_gap.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ typedef struct
662662
typedef struct
663663
{
664664
uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */
665-
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
666-
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
665+
uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply
666+
with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or
667667
@ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */
668668
} ble_gap_evt_passkey_display_t;
669669

@@ -683,7 +683,7 @@ typedef struct
683683
/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */
684684
typedef struct
685685
{
686-
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
686+
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
687687
inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */
688688
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. */
689689
} ble_gap_evt_lesc_dhkey_request_t;
@@ -723,7 +723,7 @@ typedef struct
723723
ble_gap_enc_key_t *p_enc_key; /**< Encryption Key, or NULL. */
724724
ble_gap_id_key_t *p_id_key; /**< Identity Key, or NULL. */
725725
ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */
726-
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
726+
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
727727
in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */
728728
} ble_gap_sec_keys_t;
729729

@@ -812,7 +812,7 @@ typedef struct
812812
typedef struct
813813
{
814814
uint16_t conn_handle; /**< Connection Handle on which event occurred. */
815-
union /**< union alternative identified by evt_id in enclosing struct. */
815+
union gap_evt_params_union /**< union alternative identified by evt_id in enclosing struct. */
816816
{
817817
ble_gap_evt_connected_t connected; /**< Connected Event Parameters. */
818818
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
10781078
* @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported data type.
10791079
* @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied.
10801080
*/
1081-
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);
1081+
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);
10821082

10831083

10841084
/**@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_
12761276
* @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.
12771277
* @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.
12781278
*/
1279-
SD_RPC_API uint32_t sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_len);
1279+
SD_RPC_API uint32_t sd_ble_gap_device_name_get(adapter_t *adapter, uint8_t *p_dev_name, uint16_t *p_dev_len);
12801280

12811281

12821282
/**@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
13701370
* @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.
13711371
* @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
13721372
* already been provided during a previous call to @ref sd_ble_gap_authenticate.
1373-
* @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
1374-
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
1373+
* @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
1374+
* will be stored into the memory referenced by the pointers inside this structure. The keys will be stored and available to the application
13751375
* upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.
13761376
* Note that the SoftDevice expects the application to provide memory for storing the
13771377
* peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The pointers to the local key

src/sd_api_v2/sdk/components/softdevice/s132/headers/ble_gattc.h

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
/*
1+
/*
22
* Copyright (c) Nordic Semiconductor ASA
33
* All rights reserved.
4-
*
4+
*
55
* Redistribution and use in source and binary forms, with or without modification,
66
* are permitted provided that the following conditions are met:
7-
*
7+
*
88
* 1. Redistributions of source code must retain the above copyright notice, this
99
* list of conditions and the following disclaimer.
10-
*
10+
*
1111
* 2. Redistributions in binary form must reproduce the above copyright notice, this
1212
* list of conditions and the following disclaimer in the documentation and/or
1313
* other materials provided with the distribution.
14-
*
14+
*
1515
* 3. Neither the name of Nordic Semiconductor ASA nor the names of other
1616
* contributors to this software may be used to endorse or promote products
1717
* derived from this software without specific prior written permission.
18-
*
18+
*
1919
* 4. This software must only be used in a processor manufactured by Nordic
2020
* Semiconductor ASA, or in a processor manufactured by a third party that
2121
* is used in combination with a processor manufactured by Nordic Semiconductor.
22-
*
23-
*
22+
*
23+
*
2424
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2525
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2626
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -31,7 +31,7 @@
3131
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3232
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3333
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34-
*
34+
*
3535
*/
3636

3737
/**
@@ -170,7 +170,8 @@ typedef struct
170170
typedef struct
171171
{
172172
uint16_t handle; /**< Attribute handle. */
173-
union {
173+
union gattc_attr_info_union
174+
{
174175
ble_uuid_t uuid16; /**< 16-bit Attribute UUID. */
175176
ble_uuid128_t uuid128; /**< 128-bit Attribute UUID. */
176177
} info;
@@ -218,10 +219,10 @@ typedef struct
218219
} ble_gattc_evt_attr_info_disc_rsp_t;
219220

220221
/**@brief GATT read by UUID handle value pair. */
221-
typedef struct
222+
typedef struct
222223
{
223224
uint16_t handle; /**< Attribute Handle. */
224-
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).
225+
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).
225226
Please note that this pointer is absolute to the memory provided by the user when retrieving the event,
226227
so it will effectively point to a location inside the handle_value array. */
227228
} ble_gattc_handle_value_t;
@@ -286,7 +287,7 @@ typedef struct
286287
uint16_t conn_handle; /**< Connection Handle on which event occured. */
287288
uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */
288289
uint16_t error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */
289-
union
290+
union gattc_evt_params_union
290291
{
291292
ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */
292293
ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp; /**< Relationship Discovery Response Event Parameters. */
@@ -308,7 +309,7 @@ typedef struct
308309

309310
/**@brief Initiate or continue a GATT Primary Service Discovery procedure.
310311
*
311-
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
312+
* @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.
312313
* If the last service has not been reached, this function must be called again with an updated start handle value to continue the search.
313314
*
314315
* @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
317318
* @events
318319
* @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}
319320
* @endevents
320-
*
321+
*
321322
* @mscs
322323
* @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}
323324
* @endmscs
324-
*
325+
*
325326
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
326327
* @param[in] start_handle Handle to start searching from.
327328
* @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
343344
* @events
344345
* @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}
345346
* @endevents
346-
*
347+
*
347348
* @mscs
348349
* @mmsc{@ref BLE_GATTC_REL_DISC_MSC}
349350
* @endmscs
350-
*
351+
*
351352
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
352353
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
353354
*
@@ -376,7 +377,7 @@ SD_RPC_API uint32_t sd_ble_gattc_relationships_discover(adapter_t *adapter, uint
376377
* @mscs
377378
* @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}
378379
* @endmscs
379-
*
380+
*
380381
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
381382
* @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.
382383
*
@@ -401,7 +402,7 @@ SD_RPC_API uint32_t sd_ble_gattc_characteristics_discover(adapter_t *adapter, ui
401402
* @mscs
402403
* @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}
403404
* @endmscs
404-
*
405+
*
405406
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
406407
* @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on.
407408
*
@@ -422,11 +423,11 @@ SD_RPC_API uint32_t sd_ble_gattc_descriptors_discover(adapter_t *adapter, uint16
422423
* @events
423424
* @event{BLE_GATTC_EVT_DESC_DISC_RSP}
424425
* @endevents
425-
*
426+
*
426427
* @mscs
427428
* @mmsc{@ref BLE_GATTC_READ_UUID_MSC}
428429
* @endmscs
429-
*
430+
*
430431
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
431432
* @param[in] p_uuid Pointer to a Characteristic value UUID to read.
432433
* @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
443444
/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure.
444445
*
445446
* @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or Descriptor
446-
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
447+
* to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read the
447448
* complete value.
448449
*
449450
* @events
450451
* @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}
451452
* @endevents
452-
*
453+
*
453454
* @mscs
454455
* @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}
455456
* @endmscs
456-
*
457+
*
457458
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
458459
* @param[in] handle The handle of the attribute to be read.
459460
* @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,
468469

469470
/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.
470471
*
471-
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
472+
* @details This function initiates a GATT Read Multiple Characteristic Values procedure.
472473
*
473474
* @events
474475
* @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}
475476
* @endevents
476-
*
477+
*
477478
* @mscs
478479
* @mmsc{@ref BLE_GATTC_READ_MULT_MSC}
479480
* @endmscs
480-
*
481+
*
481482
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
482483
* @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.
483484
* @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
493494

494495
/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable) procedure.
495496
*
496-
* @details This function can perform all write procedures described in GATT.
497+
* @details This function can perform all write procedures described in GATT.
497498
*
498-
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
499-
* 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
500-
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
499+
* @note It is important to note that a write without response will <b>consume an application buffer</b>, and will therefore
500+
* 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
501+
* standard client internal buffer and thus will only generate a @ref BLE_GATTC_EVT_WRITE_RSP event as soon as the write response
501502
* has been received from the peer. Please see the documentation of @ref sd_ble_tx_packet_count_get for more details.
502503
*
503504
* @events
504505
* @event{@ref BLE_GATTC_EVT_WRITE_RSP, Generated when using write request or queued writes.}
505506
* @endevents
506-
*
507+
*
507508
* @mscs
508509
* @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}
509510
* @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}
510511
* @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}
511512
* @mmsc{@ref BLE_COMMON_APP_BUFF_MSC}
512513
* @endmscs
513-
*
514+
*
514515
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
515516
* @param[in] p_write_params A pointer to a write parameters structure.
516517
*
@@ -527,11 +528,11 @@ SD_RPC_API uint32_t sd_ble_gattc_write(adapter_t *adapter, uint16_t conn_handle,
527528

528529

529530
/**@brief Send a Handle Value Confirmation to the GATT Server.
530-
*
531+
*
531532
* @mscs
532533
* @mmsc{@ref BLE_GATTC_HVI_MSC}
533534
* @endmscs
534-
*
535+
*
535536
* @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
536537
* @param[in] handle The handle of the attribute in the indication.
537538
*

src/sd_api_v2/sdk/components/softdevice/s132/headers/ble_gatts.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ typedef struct
281281
typedef struct
282282
{
283283
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
284-
union {
284+
union gatts_rw_authorize_reply_params_union
285+
{
285286
ble_gatts_authorize_params_t read; /**< Read authorization parameters. */
286287
ble_gatts_authorize_params_t write; /**< Write authorization parameters. */
287288
} params; /**< Reply Parameters. */
@@ -314,7 +315,8 @@ typedef struct
314315
typedef struct
315316
{
316317
uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */
317-
union {
318+
union gatts_evt_rw_authorize_request_union
319+
{
318320
ble_gatts_evt_read_t read; /**< Attribute Read Parameters. */
319321
ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */
320322
} request; /**< Request Parameters. */
@@ -344,7 +346,7 @@ typedef struct
344346
typedef struct
345347
{
346348
uint16_t conn_handle; /**< Connection Handle on which the event occurred. */
347-
union
349+
union gatts_evt_union
348350
{
349351
ble_gatts_evt_write_t write; /**< Write Event Parameters. */
350352
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_
688690
* @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer.
689691
* @retval ::NRF_ERROR_NOT_FOUND No system attributes found.
690692
*/
691-
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);
693+
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);
692694

693695

694696
/**@brief Retrieve the first valid user attribute handle.

src/sd_api_v2/sdk/components/softdevice/s132/headers/ble_l2cap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ typedef struct
120120
typedef struct
121121
{
122122
uint16_t conn_handle; /**< Connection Handle on which event occured. */
123-
union
123+
union l2cap_evt_params_union
124124
{
125125
ble_l2cap_evt_rx_t rx; /**< RX Event parameters. */
126126
} params; /**< Event Parameters. */
@@ -191,7 +191,7 @@ SD_RPC_API uint32_t sd_ble_l2cap_cid_unregister(adapter_t *adapter, uint16_t cid
191191
* @retval ::BLE_ERROR_NO_TX_PACKETS Not enough application packets available.
192192
* @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, see @ref BLE_L2CAP_MTU_DEF.
193193
*/
194-
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);
194+
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);
195195

196196
/** @} */
197197

0 commit comments

Comments
 (0)