blob: c2ee75e9669c8dc6bd5ff8317d98b14b5543ae6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright 2025 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <stdint.h>
/**
* \file
*
* \defgroup battery Battery Driver API
*
* \brief API to query battery status.
* \{
*/
/**
* \brief Initialize the battery driver. This function must be called only once, before any of the below functions can be called.
*/
void battery_driver_init(void);
/**
* \brief Sample battery level.
*
* \return The battery percentage, in the range 0-100.
*/
uint8_t battery_driver_sample_percent(void);
/** \} */
|