2022-09-20 18:08:37 -05:00
|
|
|
/* see LICENSE file for details on license */
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "module.h"
|
2022-11-13 10:03:55 -06:00
|
|
|
#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
|
|
|
}
|