[FL-2297, FL-2289] Power info command, Validator fixes (#1097)
* Power info command, validator fixes * strdup in validator, fix memory leak * furi_hal_crypto fixed again * FuriHal: limit ARR and CC in speaker hal * FuriHal: LL_TIM_DisableAllOutputs in speaker stop * Rpc: fix memory leak in screen streaming * Get rid of crypto_enable/crypto_disable Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -113,6 +113,12 @@ uint32_t furi_hal_power_get_battery_remaining_capacity();
|
||||
*/
|
||||
uint32_t furi_hal_power_get_battery_full_capacity();
|
||||
|
||||
/** Get battery capacity in mAh from battery profile
|
||||
*
|
||||
* @return capacity in mAh
|
||||
*/
|
||||
uint32_t furi_hal_power_get_battery_design_capacity();
|
||||
|
||||
/** Get battery voltage in V
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
@@ -171,6 +177,23 @@ void furi_hal_power_suppress_charge_enter();
|
||||
*/
|
||||
void furi_hal_power_suppress_charge_exit();
|
||||
|
||||
/** Callback type called by furi_hal_power_info_get every time another key-value pair of information is ready
|
||||
*
|
||||
* @param key[in] power information type identifier
|
||||
* @param value[in] power information value
|
||||
* @param last[in] whether the passed key-value pair is the last one
|
||||
* @param context[in] to pass to callback
|
||||
*/
|
||||
typedef void (
|
||||
*FuriHalPowerInfoCallback)(const char* key, const char* value, bool last, void* context);
|
||||
|
||||
/** Get power information
|
||||
*
|
||||
* @param[in] callback callback to provide with new data
|
||||
* @param[in] context context to pass to callback
|
||||
*/
|
||||
void furi_hal_power_info_get(FuriHalPowerInfoCallback callback, void* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user