GATTS_AddService

C

uint16_t GATTS_AddService(GATTS_Service_T *p_service, uint8_t numAttributes);

Description

This API registers service to GATT server.

Parameters

ParameterDescription
[in] p_servicePointer to the registering service information.
[in] numAttributesNumber of the attributes in the registering service.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully registering the service.
MBA_RES_FAILFail to register the service. The assigned attribute handles in the service conflict or the start handle of the service is smaller than GATTS_APP_SVC_START_HDL.