[FL-1906] Documentation: add Doxyfile, prepare sources for doxygen. (#741)
* Documentation: add Doxyfile, prepare sources for doxygen. * Update ReadMe and remove obsolete CLA * Add contribution guide * Contributing: update text * Correct spelling
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @file furi-hal-power.h
|
||||
* Power HAL API
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -14,92 +19,142 @@ typedef enum {
|
||||
FuriHalPowerICFuelGauge,
|
||||
} FuriHalPowerIC;
|
||||
|
||||
/** Initialize drivers */
|
||||
/** Initialize drivers
|
||||
*/
|
||||
void furi_hal_power_init();
|
||||
|
||||
/**
|
||||
* Get current insomnia level
|
||||
* @return insomnia level: 0 - no insomnia, >0 - insomnia, bearer count.
|
||||
/** Get current insomnia level
|
||||
*
|
||||
* @return insomnia level: 0 - no insomnia, >0 - insomnia, bearer count.
|
||||
*/
|
||||
uint16_t furi_hal_power_insomnia_level();
|
||||
|
||||
/**
|
||||
* Enter insomnia mode
|
||||
* Prevents device from going to sleep
|
||||
* @warning Internally increases insomnia level
|
||||
* Must be paired with furi_hal_power_insomnia_exit
|
||||
/** Enter insomnia mode Prevents device from going to sleep
|
||||
* @warning Internally increases insomnia level Must be paired with
|
||||
* furi_hal_power_insomnia_exit
|
||||
*/
|
||||
void furi_hal_power_insomnia_enter();
|
||||
|
||||
/**
|
||||
* Exit insomnia mode
|
||||
* Allow device to go to sleep
|
||||
* @warning Internally decreases insomnia level.
|
||||
* Must be paired with furi_hal_power_insomnia_enter
|
||||
/** Exit insomnia mode Allow device to go to sleep
|
||||
* @warning Internally decreases insomnia level. Must be paired with
|
||||
* furi_hal_power_insomnia_enter
|
||||
*/
|
||||
void furi_hal_power_insomnia_exit();
|
||||
|
||||
/** Check if sleep availble */
|
||||
/** Check if sleep availble
|
||||
*
|
||||
* @return true if available
|
||||
*/
|
||||
bool furi_hal_power_sleep_available();
|
||||
|
||||
/** Check if deep sleep availble */
|
||||
/** Check if deep sleep availble
|
||||
*
|
||||
* @return true if available
|
||||
*/
|
||||
bool furi_hal_power_deep_sleep_available();
|
||||
|
||||
/** Go to sleep */
|
||||
/** Go to sleep
|
||||
*/
|
||||
void furi_hal_power_sleep();
|
||||
|
||||
/** Get predicted remaining battery capacity in percents */
|
||||
/** Get predicted remaining battery capacity in percents
|
||||
*
|
||||
* @return remaining battery capacity in percents
|
||||
*/
|
||||
uint8_t furi_hal_power_get_pct();
|
||||
|
||||
/** Get battery health state in percents */
|
||||
/** Get battery health state in percents
|
||||
*
|
||||
* @return health in percents
|
||||
*/
|
||||
uint8_t furi_hal_power_get_bat_health_pct();
|
||||
|
||||
/** Get charging status */
|
||||
/** Get charging status
|
||||
*
|
||||
* @return true if charging
|
||||
*/
|
||||
bool furi_hal_power_is_charging();
|
||||
|
||||
/** Poweroff device */
|
||||
/** Poweroff device
|
||||
*/
|
||||
void furi_hal_power_off();
|
||||
|
||||
/** Reset device */
|
||||
/** Reset device
|
||||
*/
|
||||
void furi_hal_power_reset();
|
||||
|
||||
/** OTG enable */
|
||||
/** OTG enable
|
||||
*/
|
||||
void furi_hal_power_enable_otg();
|
||||
|
||||
/** OTG disable */
|
||||
/** OTG disable
|
||||
*/
|
||||
void furi_hal_power_disable_otg();
|
||||
|
||||
/** Get OTG status */
|
||||
/** Get OTG status
|
||||
*
|
||||
* @return true if enabled
|
||||
*/
|
||||
bool furi_hal_power_is_otg_enabled();
|
||||
|
||||
/** Get remaining battery battery capacity in mAh */
|
||||
/** Get remaining battery battery capacity in mAh
|
||||
*
|
||||
* @return capacity in mAh
|
||||
*/
|
||||
uint32_t furi_hal_power_get_battery_remaining_capacity();
|
||||
|
||||
/** Get full charge battery capacity in mAh */
|
||||
/** Get full charge battery capacity in mAh
|
||||
*
|
||||
* @return capacity in mAh
|
||||
*/
|
||||
uint32_t furi_hal_power_get_battery_full_capacity();
|
||||
|
||||
/** Get battery voltage in V */
|
||||
/** Get battery voltage in V
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return voltage in V
|
||||
*/
|
||||
float furi_hal_power_get_battery_voltage(FuriHalPowerIC ic);
|
||||
|
||||
/** Get battery current in A */
|
||||
/** Get battery current in A
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return current in A
|
||||
*/
|
||||
float furi_hal_power_get_battery_current(FuriHalPowerIC ic);
|
||||
|
||||
/** Get temperature in C */
|
||||
/** Get temperature in C
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return temperature in C
|
||||
*/
|
||||
float furi_hal_power_get_battery_temperature(FuriHalPowerIC ic);
|
||||
|
||||
/** Get System voltage in V */
|
||||
/** Get System voltage in V
|
||||
*
|
||||
* @return voltage in V
|
||||
*/
|
||||
float furi_hal_power_get_system_voltage();
|
||||
|
||||
/** Get USB voltage in V */
|
||||
/** Get USB voltage in V
|
||||
*
|
||||
* @return voltage in V
|
||||
*/
|
||||
float furi_hal_power_get_usb_voltage();
|
||||
|
||||
/** Get power system component state */
|
||||
/** Get power system component state
|
||||
*/
|
||||
void furi_hal_power_dump_state();
|
||||
|
||||
/** Enable 3.3v on external gpio and sd card */
|
||||
/** Enable 3.3v on external gpio and sd card
|
||||
*/
|
||||
void furi_hal_power_enable_external_3_3v();
|
||||
|
||||
/** Disable 3.3v on external gpio and sd card */
|
||||
/** Disable 3.3v on external gpio and sd card
|
||||
*/
|
||||
void furi_hal_power_disable_external_3_3v();
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user