We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e38e82 commit 5452515Copy full SHA for 5452515
1 file changed
board/hx20/battery.c
@@ -363,8 +363,9 @@ static enum ec_status cmd_charging_limit_control(struct host_cmd_handler_args *a
363
charging_maximum_level = charging_maximum_level | CHG_LIMIT_OVERRIDE;
364
365
if (p->modes & CHG_LIMIT_GET_LIMIT) {
366
- system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &charging_maximum_level);
367
- r->max_percentage = charging_maximum_level;
+ uint8_t max = 0;
+ system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &max);
368
+ r->max_percentage = max;
369
args->response_size = sizeof(*r);
370
}
371
0 commit comments