EasyManuals Logo

Texas Instruments CC2541EMK Software Developers Guide

Texas Instruments CC2541EMK
162 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #56 background imageLoading...
Page #56 background image
Generic Attribute Profile (GATT)
www.ti.com
56
SWRU271HOctober 2010Revised April 2019
Submit Documentation Feedback
Copyright © 2010–2019, Texas Instruments Incorporated
The Bluetooth Low Energy Protocol Stack
5.5.4.2.2 Add Service Function
As Section 5.5.4.1 describes, when an application starts up it must add the GATT services it supports.
Each profile needs a global AddService function that can be called by the application. Some of these
services are defined in the protocol stack, such as GGS_AddService and GATTServApp_AddService.
User-defined services must expose their own AddService function that the application can call for profile
initialization. Using SimpleProfile_AddService() as an example, these functions should do the following:
Allocate space for the client characteristic configuration (CCC) arrays.
As described in Section 5.5.4.2.1.4, a pointer to one of these arrays initialized in the profile. In the
AddService function, several supported connections are declared and memory is allocated for each
array. One CCC is defined in the simpleGATTProfile but the profile may contain additional CCCs.
Initialize the CCC arrays.
CCC values do not change between power downs and bonded device connections because they are
stored in NV. For each CCC in the profile, the GATTServApp_InitCharCfg() function must be called.
This function initializes the CCCs with information from a previously bonded connection. If the function
cannot find the information, set the initial values to default values.
Register the profile with the GATTServApp.
This function passes the attribute table of the profile to the GATTServApp so the attributes of the
profile are added to the application-wide attribute table, which is managed by the protocol stack. The
GATTServApp function assigns handles for each attribute. This function also passes pointers the
callback of the profile to the stack to initiate communication between the GATTServApp and the profile.

Table of Contents

Other manuals for Texas Instruments CC2541EMK

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments CC2541EMK and is the answer not in the manual?

Texas Instruments CC2541EMK Specifications

General IconGeneral
BrandTexas Instruments
ModelCC2541EMK
CategoryMicrocontrollers
LanguageEnglish

Related product manuals