comparison src/cs/drivers/drv_app/fchg/fchg_api.c @ 336:be011556e71f

FCHG: API implementation started
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 14 Dec 2017 21:01:59 +0000
parents
children 3a7810ca74e2
comparison
equal deleted inserted replaced
335:6c0659acf93e 336:be011556e71f
1 /*
2 * The implementation of our external API functions lives here.
3 */
4
5 #include "fchg/fchg_api.h"
6 #include "fchg/fchg_env.h"
7 #include "fchg/fchg_messages.h"
8 #include "rv/rv_general.h"
9 #include "rvf/rvf_api.h"
10 #include "rvm/rvm_use_id_list.h"
11
12 T_RV_RET fchg_get_current_state(struct fchg_user_state *rstruct)
13 {
14 rstruct->chg_state = pwr_ctrl->state;
15 rstruct->batt_mv = pwr_ctrl->batt_mv;
16 rstruct->batt_percent =
17 pwr_ctrl->batt_thresholds[pwr_ctrl->curr_disch_thresh].remain_capa;
18 return RV_OK;
19 }