GATTS_AddService
C
uint16_t GATTS_AddService(GATTS_Service_T *p_service, uint8_t numAttributes);Description
This API registers service to GATT server.
Note
Note that the start handle of the registering service should be greater than GATTS_APP_SVC_START_HDL.
Parameters
| Parameter | Description | 
|---|---|
| [in] p_service | Pointer to the registering service information. | 
| [in] numAttributes | Number of the attributes in the registering service. | 
Return values
| Return value | Description | 
|---|---|
| MBA_RES_SUCCESS | Successfully registering the service. | 
| MBA_RES_FAIL | Fail 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. | 
