1 Reply Latest reply on Aug 20, 2015 2:40 AM by jobi

    Writing uint16 characteristic

    user_516327008

      I'm trying to take a uint16 characteristic and store it in a local variable. This is the code:

         

           wrReqParam = (CYBLE_GATTS_WRITE_REQ_PARAM_T *) eventParam;
                  
                       /* If the attribute handle of the characteristic written to
                       * is equal to that of the Delay_Info characteristic, then extract
                       * the Delay_Info data */
                       if (CYBLE_DELAY_SERVICE_DELAY_INFO_CHAR_HANDLE ==
                                                   wrReqParam->handleValPair.attrHandle)
                       {
                            TimeSignature[0] =
                                       wrReqParam->handleValPair.value.val[0];
                            TimeSignature[1] = 
                                       wrReqParam->handleValPair.value.val[1];
                      
                                       Delay = wrReqParam->handleValPair.value.val;
                       }

         

      wrReqParam works for the uint8 TimeSignature, but Delay is a uint16 and therefore gives me an error. Is there any way around this? Thanks in advance.