Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char Read_Char(uint16 address){
- char data = 0;
- range.startHandle = 0x0001;
- range.endHandle = 0x0030;
- uuid.uuid16 = address;
- readByTypeReqParam.range = range;
- readByTypeReqParam.uuid = uuid;
- readByTypeReqParam.uuidFormat = 0x01;
- apiResult = CyBle_GattcReadUsingCharacteristicUuid(connHandle, &readByTypeReqParam);
- data = 0;
- read_State = WAIT;
- switch (read_State)
- {
- case ADQUIRE:
- data = readResponse.value.val[3];
- read_State = REQUEST;
- stateble = CyBle_GetState();
- break;
- case WAIT:
- data = 0;
- break;
- }
- return data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement