# HG changeset patch # User Mychaela Falconia # Date 1513364292 0 # Node ID 651778900ec121cc68a72b0b73829a032839336f # Parent 2f41f78832619a18b74d9987ce3c99621a474f01 .../drv_app/abb/board/abb_inth.c: FCHG hooked in diff -r 2f41f7883261 -r 651778900ec1 src/cs/drivers/drv_app/abb/board/abb_inth.c --- a/src/cs/drivers/drv_app/abb/board/abb_inth.c Fri Dec 15 18:57:05 2017 +0000 +++ b/src/cs/drivers/drv_app/abb/board/abb_inth.c Fri Dec 15 18:58:12 2017 +0000 @@ -68,13 +68,18 @@ #include "kpd/kpd_power_api.h" // for kpd_power_key_pressed() #include "power/power.h" - #ifdef RVM_LCC_SWE #include "lcc/lcc_api.h" #include "lcc/lcc_cfg_i.h" #include "lcc/lcc.h" #include "lcc/lcc_env.h" #endif + +#ifdef RVM_FCHG_SWE + #include "fchg/fchg_struct.h" + #include "fchg/fchg_messages.h" +#endif + /********************************************************************************/ /* */ /* Function Name: spi_abb_read_int_reg_callback */ @@ -91,12 +96,11 @@ xSignalHeaderRec *adc_msg; volatile SYS_UWORD8 i; -#ifdef RVM_LCC_SWE +#if (defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) struct pwr_adc_ind_s *addr; extern T_PWR_CTRL_BLOCK *pwr_ctrl; #endif - // check all the possible causes of the ABB IT if (*read_value & PUSHOFF_IT_STS) { @@ -181,7 +185,7 @@ ((T_CST_ADC_RESULT *)(adc_msg->SigP))->adc_result[i] = SPI_GBL_INFO_PTR->adc_result[i]; } os_send_sig(adc_msg, RRM1_QUEUE); -#ifdef RVM_LCC_SWE +#if (defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) // Send ADC measurement to PWR (LCC) task // NOTE that memory is allocated externally in the PWR task if (rvf_get_buf(pwr_ctrl->prim_id, sizeof(struct pwr_adc_ind_s), (void *)&addr) == RVF_RED) { @@ -205,7 +209,7 @@ } } -#if (defined(RVM_PWR_SWE) || defined(RVM_LCC_SWE)) +#if (defined(RVM_PWR_SWE) || defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) else if (*read_value & CHARGER_IT_STS) { /* Charger plug IN or OUT */ @@ -220,7 +224,7 @@ #ifdef RVM_PWR_SWE PWR_Charger_Plug(); /* charger plugged IN */ #endif -#ifdef RVM_LCC_SWE +#if (defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) // Forward charger plug indication to PWR (LCC) task // NOTE that memory is allocated externally in the PWR task if (rvf_get_buf(pwr_ctrl->prim_id, sizeof(struct pwr_req_s), (void *)&addr) == RVF_RED) { @@ -243,7 +247,7 @@ #ifdef RVM_PWR_SWE PWR_Charger_Unplug(); /* charger plugged OUT */ #endif -#ifdef RVM_LCC_SWE +#if (defined(RVM_LCC_SWE) || defined(RVM_FCHG_SWE)) // Forward charger unplug indication to PWR (LCC) task // NOTE that memory is allocated externally in the PWR task if (rvf_get_buf(pwr_ctrl->prim_id, sizeof(struct pwr_req_s), (void *)&addr) == RVF_RED) {