Files
microchip-application-bmd38…/le_gatt.c
T
2023-07-27 15:55:48 +08:00

42 lines
704 B
C

#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include "app_config.h"
#include "apply_old_config.h"
#include "sdk_config.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "nrf_sdh.h"
#include "nrf_sdh_ble.h"
#include "nrf_sdh_freertos.h"
#include "ble_gatt.h"
#include "nrf_ble_gatt.h"
#ifdef __cplusplus
}
#endif
NRF_BLE_GATT_DEF(m_gatt); /**< GATT module instance. */
void le_gatt_init(void)
{
ret_code_t err_code = nrf_ble_gatt_init(&m_gatt, NULL);
APP_ERROR_CHECK(err_code);
}
uint16_t le_gatt_mtu(void)
{
return nrf_ble_gatt_eff_mtu_get(&m_gatt, 0);
}