Module for negotiating and keeping track of the maximum ATT_MTU size. More...
Module for negotiating and keeping track of the maximum ATT_MTU size.
Default maximum number of peripheral links.
To override this default value, define the maximum number of peripheral links in your module.
#define NRF_BLE_GATT_MAX_MTU_SIZE GATT_MTU_SIZE_DEFAULTDefault maximum ATT_MTU size.
This define specifies a fallback value for the case where NRF_BLE_GATT_MAX_MTU_SIZE is not set in the GATT module configuration.
#define NRF_BLE_PERIPHERAL_LINK_COUNT 1Default maximum number of central links.
To override this default value, define the maximum number of central links in your module.
GATT module event handler type.
The GATT module calls a function of this type when the ATT_MTU value is changed.
Function for setting the ATT_MTU size for the next link that is established as central.
Parameters [in]p_gattPointer to the GATT structure.[in]desired_mtuRequested ATT_MTU size. Return values NRF_SUCCESSIf the operation was successful.NRF_ERROR_NULLIf the pointer to p_gatt is NULL.NRF_ERROR_INVALID_PARAMIf the size of desired_mtu is bigger than NRF_BLE_GATT_MAX_MTU_SIZE or smaller than GATT_MTU_SIZE_DEFAULT. ret_code_t nrf_ble_gatt_att_mtu_periph_set(nrf_ble_gatt_t * p_gatt, uint16_t desired_mtu )Function for setting the ATT_MTU size for the next link that is established as peripheral.
Parameters [in]p_gattPointer to the GATT structure.[in]desired_mtuRequested ATT_MTU size. Return values NRF_SUCCESSIf the operation was successful.NRF_ERROR_NULLIf the pointer to p_gatt is NULL.NRF_ERROR_INVALID_PARAMIf the size of desired_mtu is bigger than NRF_BLE_GATT_MAX_MTU_SIZE or smaller than GATT_MTU_SIZE_DEFAULT. uint16_t nrf_ble_gatt_eff_mtu_get(nrf_ble_gatt_t * p_gatt, uint16_t conn_handle )Function for getting the current ATT_MTU size for a connection handle.
Parameters [in]p_gattPointer to the GATT structure.[in]conn_handleConnection handle of the link. Returns ATT_MTU size for the given link. Return values 0If the pointer to p_gatt is NULL or if conn_handle is larger than the supported maximum number of connections. ret_code_t nrf_ble_gatt_init(nrf_ble_gatt_t * p_gatt, nrf_ble_gatt_evt_handler_t evt_handler )Function for initializing the GATT module.
Parameters [in]evt_handlerEvent handler.[out]p_gattPointer to the GATT structure. Return values NRF_SUCCESSIf the operation was successful.NRF_ERROR_NULLIf the pointer to p_gatt is NULL. void nrf_ble_gatt_on_ble_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t * p_ble_evt )Function for handling BLE stack events.
This function handles all events from the BLE stack that are of interest to the GATT module.
Parameters [in]p_gattPointer to the GATT structure.[in]p_ble_evtEvent received from the BLE stack.