Go to the source code of this file.
◆ RI_GATT_CONN_SUP_TIMEOUT_MS
#define RI_GATT_CONN_SUP_TIMEOUT_MS (6000U) |
◆ RI_GATT_MAX_INTERVAL_LOW_POWER_MS
#define RI_GATT_MAX_INTERVAL_LOW_POWER_MS (1980U) |
◆ RI_GATT_MAX_INTERVAL_STANDARD_MS
#define RI_GATT_MAX_INTERVAL_STANDARD_MS (510U) |
◆ RI_GATT_MAX_INTERVAL_TURBO_MS
#define RI_GATT_MAX_INTERVAL_TURBO_MS (30U) |
◆ RI_GATT_MIN_INTERVAL_LOW_POWER_MS
#define RI_GATT_MIN_INTERVAL_LOW_POWER_MS (1950U) |
◆ RI_GATT_MIN_INTERVAL_STANDARD_MS
#define RI_GATT_MIN_INTERVAL_STANDARD_MS (480U) |
◆ RI_GATT_MIN_INTERVAL_TURBO_MS
#define RI_GATT_MIN_INTERVAL_TURBO_MS (15U) |
◆ RI_GATT_SLAVE_LATENCY_LOW_POWER
#define RI_GATT_SLAVE_LATENCY_LOW_POWER (0U) |
◆ RI_GATT_SLAVE_LATENCY_STANDARD
#define RI_GATT_SLAVE_LATENCY_STANDARD (1U) |
◆ RI_GATT_SLAVE_LATENCY_TURBO
#define RI_GATT_SLAVE_LATENCY_TURBO (0U) |
◆ ri_gatt_dfu_init()
Initialize BLE4 Device firmware update service.
- Returns
- RD_SUCCESS on success
-
error code from stack in case there is error.
◆ ri_gatt_dis_init()
Initialize BLE4 Device Information service.
- Parameters
-
[in] | dis | pointer to data which should be presented over DIS. Memory will be deep-copied |
- Returns
- RD_SUCCESS on success
-
error code from stack in case there is error.
◆ ri_gatt_init()
Initializes GATT stack. Uses default values from sdk_config.h, these can be overridden in nrf5_sdk15_application_config.h.
- Returns
- RD_SUCCESS on success
-
RD_ERROR_INVALID_STATE if radio module is not initialized with handle RI_COMMUNICATION_RADIO_GATT
◆ ri_gatt_nus_init()
Initialize Nordic UART Service as a communication channel. ri_communication_radio_init(RI_COMMUNICATION_RADIO_GATT) must be called before initializing service.
- Parameters
-
[in] | channel | Pointer to communication interface which will be populated. Pointer will be copied, the structure must be retained. Adding any event handler to structure after initialization will take effect immediately |
- Returns
- RD_SUCCESS on success.
-
error code from stack in case there is other error.
◆ ri_gatt_nus_uninit()
Uninitialize Nordic UART Service as a communication channel.
- Parameters
-
[in] | _channel | Pointer to communication interface which will be depopulated. |
- Returns
- RD_SUCCESS on success
-
error code from stack in case there is other error.
◆ ri_gatt_params_request()
Request connection parameter update for current connection.
This function will automatically retry connection parameter update up to 2 times and disconnects connection on failure. Takes no effect if there is no current connection.
- Parameters
-
[in] | params | One of preset defaults: RI_GATT_TURBO, RI_GATT_STANDARD, RI_GATT_LOW_POWER. |
[in] | delay_ms | Delay before trying to update for first time. 0 For immediate update, at least 100 ms otherwise. |
- Return values
-
RD_SUCCESS | Parameter update was requested |
RD_ERROR_INVALID_PARAM | params was not one of supported defaults |
RD_ERROR_INVALID_STATE | if there is no ongoing GATT connection |
Error | code from BLE Stack if applicable |
◆ ri_gatt_uninit()
Uninitializes GATT stack.
- Returns
- RD_SUCCESS on success
-
RD_ERROR_INVALID_STATE if radio module is not initialized with handle RI_COMMUNICATION_RADIO_GATT