api-hal-power.h 415 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. /* Initialize drivers */
  5. void api_hal_power_init();
  6. /* Get predicted remaining battery capacity in percents */
  7. uint8_t api_hal_power_get_pct();
  8. /* Get charging status */
  9. bool api_hal_power_is_charging();
  10. /* Poweroff system */
  11. void api_hal_power_off();
  12. /* OTG enable */
  13. void api_hal_power_enable_otg();
  14. /* OTG disable */
  15. void api_hal_power_disable_otg();