Continue balancing on fault
This commit is contained in:
		@ -199,6 +199,18 @@
 | 
				
			|||||||
#define OV_FAULT_SUM (1 << 14)
 | 
					#define OV_FAULT_SUM (1 << 14)
 | 
				
			||||||
#define UV_FAULT_SUM (1 << 15)
 | 
					#define UV_FAULT_SUM (1 << 15)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_FOREVER (0 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_1SEC (1 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_1MIN (2 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_2MIN (3 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_5MIN (4 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_10MIN (5 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_15MIN (6 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_20MIN (7 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_30MIN (8 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_TIME_60MIN (9 << 4)
 | 
				
			||||||
 | 
					#define CBCONFIG_BAL_CONTINUE (1 << 3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DEVCONFIG_REG_DISABLE (1 << 5)
 | 
					#define DEVCONFIG_REG_DISABLE (1 << 5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* INC_BQ_REGISTER_DEFINITIONS_H_ */
 | 
					#endif /* INC_BQ_REGISTER_DEFINITIONS_H_ */
 | 
				
			||||||
 | 
				
			|||||||
@ -204,7 +204,8 @@ void afe_config_power() {
 | 
				
			|||||||
void afe_activate_LED() { BQ_Write_Register(GPIO_OUT, GPIO_OUT_SIZE, 0x01); }
 | 
					void afe_activate_LED() { BQ_Write_Register(GPIO_OUT, GPIO_OUT_SIZE, 0x01); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void afe_config_balancing() {
 | 
					void afe_config_balancing() {
 | 
				
			||||||
  BQ_Write_Register(CBCONFIG, CBCONFIG_SIZE, 0x10);
 | 
					  BQ_Write_Register(CBCONFIG, CBCONFIG_SIZE,
 | 
				
			||||||
 | 
					                    CBCONFIG_BAL_TIME_1SEC | CBCONFIG_BAL_CONTINUE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void afe_balance_channels(uint16_t channelstobalance) {
 | 
					void afe_balance_channels(uint16_t channelstobalance) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user