Tool/software: Code Composer Studio
Hi,
I would like to know what is the difference between Button Service and SimpleKeys Service? The Button Service does not notify button press at LightBlue Iphone App, however the SimpleKeys Service, does.
At BLE Device Monitor, both Button Service and SimpleKeys Service function the same and both notify upon button press.
Simplekeys Service at Light Blue Iphone App:
Button Service at LightBlue Iphone App:
As you can see above the button service does not notify the value upon button press. The button service is from Project Zero and the SimpleKeys Service is ported from ble stack 2.2.
Also, the Get Parameter code is different. See, below. The Button Service Get Parameter does not save anything to value.
Simplekeys
bStatus_t SK_GetParameter(uint8 param, void *pValue) { bStatus_t ret = SUCCESS; switch (param) { case SK_KEY_ATTR: *((uint8*)pValue) = skKeyPressed; break; default: ret = INVALIDPARAMETER; break; } return (ret); }
Button Service.
bStatus_t ButtonService_GetParameter( uint8_t param, uint16_t *len, void *value ) { bStatus_t ret = SUCCESS; switch ( param ) { default: Log_error1("GetParameter: Parameter #%d not valid.", (IArg)param); ret = INVALIDPARAMETER; break; } return ret; }
- kel