FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/fchg/fchg_messages.c @ 0:4e78acac3d88
src/{condat,cs,gpf,nucleus}: import from Selenite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:23:26 +0000 |
parents | |
children | aec644728174 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4e78acac3d88 |
---|---|
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 } |