void batteryStateChanged(uint8_t percent) { //callback of battery level changing if (ihm != NULL) { IHM_PrintBattery(ihm, percent); } }
void batteryStateChangedCallback (uint8_t percent, void *custom) { // callback of changing of battery level IHM_t *ihm = (IHM_t *) custom; if (ihm != NULL) { IHM_PrintBattery (ihm, percent); } }