#ifndef CORE_POWER_H #define CORE_POWER_H #include #include typedef struct power_s{ u8 auto_light_off; /* Time in sec (0 = always on) */ u8 to_off; u8 light_on:1; /* Are the lights on? */ } power_t; /* Init defaults power values */ extern void power_init(power_t* p); /* Light control */ extern void power_auto_light(power_t* p); extern void power_off_light(power_t* p); extern void power_on_light(power_t* p); extern void power_switch_light(power_t* p); /* Process xml atoms */ extern int power_process_xml(void* elem, char* tag, char* content); /* Write xml atoms */ extern void power_write_xml(power_t* p, FILE* out); #endif