diff options
| author | Sam Light <sam@lightscale.co.uk> | 2025-09-10 19:37:28 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2025-09-10 19:37:28 +0100 |
| commit | d9b456d738e5013d48f41f5e6315ef7c22d6acf0 (patch) | |
| tree | 2e3722f5697cbf883c4b16edc87726b9e510bce1 /src/modules/battery.h | |
Initial commit
Diffstat (limited to 'src/modules/battery.h')
| -rw-r--r-- | src/modules/battery.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modules/battery.h b/src/modules/battery.h new file mode 100644 index 0000000..92489b5 --- /dev/null +++ b/src/modules/battery.h @@ -0,0 +1,22 @@ +#ifndef _DWXINFO_MODULES_BATTERY_H_ +#define _DWXINFO_MODULES_BATTERY_H_ + +#include <stdio.h> +#include <time.h> + +#define BATTERY_VALUE_SIZE 5 + +struct battery { + int full; + int file_current; + time_t last_update; + + char value[BATTERY_VALUE_SIZE]; +}; + +struct battery * battery_new(); +void battery_free(struct battery *); + +void battery_update(struct battery *); + +#endif |
