 d4787e859e
			
		
	
	
		d4787e859e
		
			
		
	
	
	
	
		
			
			* Power, USB, LED driver improvements * u2f hid descriptor fix * variable_item_list: value alignment fix * InputTypeRepeat handling in menu/submenu/var_item_list * lp5562: fix bugs on 400khz i2c * Scripts: lint in parallel. * FuriHal: rename some USB structure to match naming convention. Drivers: update magic values in LP5562. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <stdbool.h>
 | |
| #include <stdint.h>
 | |
| #include <furi_hal_i2c.h>
 | |
| 
 | |
| /** Initialize Driver */
 | |
| void bq25896_init(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Send device into shipping mode */
 | |
| void bq25896_poweroff(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Is currently charging */
 | |
| bool bq25896_is_charging(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Enable charging */
 | |
| void bq25896_enable_charging(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Disable charging */
 | |
| void bq25896_disable_charging(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Enable otg */
 | |
| void bq25896_enable_otg(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Disable otg */
 | |
| void bq25896_disable_otg(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Is otg enabled */
 | |
| bool bq25896_is_otg_enabled(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Check OTG BOOST Fault status */
 | |
| bool bq25896_check_otg_fault(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Get VBUS Voltage in mV */
 | |
| uint16_t bq25896_get_vbus_voltage(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Get VSYS Voltage in mV */
 | |
| uint16_t bq25896_get_vsys_voltage(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Get VBAT Voltage in mV */
 | |
| uint16_t bq25896_get_vbat_voltage(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Get VBAT current in mA */
 | |
| uint16_t bq25896_get_vbat_current(FuriHalI2cBusHandle* handle);
 | |
| 
 | |
| /** Get NTC voltage in mpct of REGN */
 | |
| uint32_t bq25896_get_ntc_mpct(FuriHalI2cBusHandle* handle);
 |