
Figure 6-3. Adding BLE-Device Information Service and its Component
4.
Newly added BLE service component must be available in the following directory:
src\thirdparty
\wireless\ble_sdk\ble_services\device_information
, as shown in the following figure.
Figure 6-4. Hierarchy of Newly Added Service Component
5.
Use the APIs, as mentioned in the Device Information Service (
device_info.h
), for incorporating this
functionality, if required in the application.
/**@brief Update the DIS characteristic value after defining the services using
dis_primary_service_define
*
* @param[in] dis_serv dis service instance
* @param[in] info_type dis characteristic type to be updated
* @param[in] info_data data need to be updated
* @return @ref AT_BLE_SUCCESS operation completed successfully.
* @return @ref AT_BLE_FAILURE Generic error.
*/
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv , dis_info_type
info_type,
dis_info_data* info_data, at_ble_handle_t conn_handle);
/**@brief DIS service and characteristic initialization (Called only once by user).
*
* @param[in] device_info_serv dis service instance
*
* @return none
*/
void dis_init_service(dis_gatt_service_handler_t *device_info_serv );
/**@brief Register a dis service instance inside stack.
*
* @param[in] dis_primary_service dis service instance
*
* @return @ref AT_BLE_SUCCESS operation completed successfully
ATBTLC1000
Adding a BLE Standard Service
©
2019 Microchip Technology Inc.
User Guide
DS50002640B-page 73