This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540: timeAppHdlCache[timeAppEndHdlIdx] = BUILD_UINT16(p[0], p[1]) - 1;

Part Number: CC2540

 "End handle is one less than handle of characteristic declaration", what this words mean exactly? Can somebody explain MORE detail about it,  I'm very confused about this and I such a big fool! Thank you advance.

The code is extracted from BloodPressure provide by Ti,  in.../ble/BloodPressure/Source/timeapp_discovery.c

static uint8 TimeAppDiscCurrTime( uint8 state, gattMsgEvent_t *pMsg )
{
...
    case DISC_CURR_TIME_CHAR:
...
    // If looking for end handle
    if ( timeAppEndHdlIdx != 0 )
    {
        // End handle is one less than handle of characteristic declaration
        timeAppHdlCache[timeAppEndHdlIdx] = BUILD_UINT16(p[0], p[1]) - 1;

       timeAppEndHdlIdx = 0;
}
...
}