SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
The client characteristic configuration descriptors (CCCD's) are now initialized as pointers which must be allocated. For example, the CCCD for simpleProfileCharacteristic 4 is declared as a pointer in simpleGATTprofile.c:
static gattCharCfg_t *simpleProfileChar4Config
This must then be allocated when the profile is added to the application (in SimpleProfile_AddService()):
bStatus_t SimpleProfile_AddService( uint32 services )
{
uint8 status;
// Allocate Client Characteristic Configuration table
simpleProfileChar4Config = (gattCharCfg_t *)osal_mem_alloc( sizeof(gattCharCfg_t) *
linkDBNumConns );
if ( simpleProfileChar4Config == NULL )
{
return ( bleMemAllocError );
}