FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/fchg/fchg_messages.c @ 338:1c711302732a
FCHG: complete enough to attempt linking into fw build
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 14 Dec 2017 22:03:48 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
337:0df0668f8bea | 338:1c711302732a |
---|---|
1 /* | |
2 * Incoming message dispatch for the FCHG task is implemented here. | |
3 */ | |
4 | |
5 #include "fchg/fchg_env.h" | |
6 #include "fchg/fchg_func_i.h" | |
7 #include "rv/rv_general.h" | |
8 #include "rvf/rvf_api.h" | |
9 #include "rvm/rvm_use_id_list.h" | |
10 | |
11 void pwr_process_message(T_RV_HDR *msg_ptr) | |
12 { | |
13 switch (msg_ptr->msg_id) { | |
14 case USER_START_CHARGE_REQ: | |
15 pwr_charge_start_req(); | |
16 return; | |
17 case USER_STOP_CHARGE_REQ: | |
18 pwr_charge_stop_req(); | |
19 return; | |
20 case PWR_CHARGER_PLUGGED_IND: | |
21 pwr_charger_plug(); | |
22 return; | |
23 case PWR_CHARGER_UNPLUGGED_IND: | |
24 pwr_charger_unplug(); | |
25 return; | |
26 case PWR_ADC_IND: | |
27 pwr_process_adc((struct pwr_adc_ind_s *) msg_ptr); | |
28 return; | |
29 default: | |
30 rvf_send_trace("FCHG task: Received an unknown message", 38, | |
31 NULL_PARAM, RV_TRACE_LEVEL_DEBUG_HIGH, | |
32 FCHG_USE_ID); | |
33 } | |
34 } |