Part Number: CC2650MODA
Tool/software: Code Composer Studio
Hi,
Is that possible, when device in sleep mode, battery goes critical level and gives automatically warning ?
//*************************************************************************
bStatus_t Batt_SetParameter(uint8_t param, uint8_t len, void *value)
{
bStatus_t ret = SUCCESS;
switch (param)
{
case BATT_PARAM_CRITICAL_LEVEL:
battCriticalLevel = *((uint8*)value);
// If below the critical level and critical state not set, notify it
if (battLevel < battCriticalLevel)
{
battNotifyLevel();
}
break;
default:
ret = INVALIDPARAMETER;
break;
}
return (ret);
}
//****************************************************************************
static void battNotifyLevel(void)
{
uint8_t i;
for (i = 0; i < linkDBNumConns; i++)
{
uint16_t connHandle = battLevelClientCharCfg[i].connHandle;
if (connHandle != INVALID_CONNHANDLE)
{
// Send notification to connected device.
battNotify(connHandle);
}
}
}
//****************************************************************************
when battCriticalLevel>battLevel i want to wake device up and sends low battery message automatically. Is that possible ?
Thanks a lot