14 lines
333 B
C
14 lines
333 B
C
/* see LICENSE file for details on license */
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
#include "module.h"
|
|
#include "file.h"
|
|
#include "battery.h"
|
|
|
|
int battery_update(struct module *module) {
|
|
char *filepath = BATTERY_PRE BATTERY_DIR BATTERY_CAP;
|
|
|
|
return read_file_into_buffer(filepath, (char *)&module->buffer, MODULE_BUFFER_LEN);
|
|
}
|