tstatus/battery.c

14 lines
333 B
C
Raw Normal View History

2022-09-20 18:08:37 -05:00
/* see LICENSE file for details on license */
#include <stdio.h>
#include <unistd.h>
#include "module.h"
#include "file.h"
2022-09-20 18:08:37 -05:00
#include "battery.h"
int battery_update(struct module *module) {
char *filepath = BATTERY_PRE BATTERY_DIR BATTERY_CAP;
2022-09-21 12:50:10 -05:00
return read_file_into_buffer(filepath, (char *)&module->buffer, MODULE_BUFFER_LEN);
2022-09-20 18:08:37 -05:00
}