diff src/cs/drivers/drv_app/fchg/fchg_task.c @ 256:aec644728174

FCHG BSIM: ETM connection implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 May 2021 02:37:14 +0000
parents 4533ef63fdb0
children
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/fchg/fchg_task.c	Wed May 12 23:20:23 2021 +0000
+++ b/src/cs/drivers/drv_app/fchg/fchg_task.c	Thu May 13 02:37:14 2021 +0000
@@ -4,10 +4,13 @@
 
 #include "fchg/fchg_env.h"
 #include "fchg/fchg_func_i.h"
+#include "fchg/bsim_func_i.h"
 #include "rv/rv_general.h"
 #include "rvf/rvf_api.h"
 #include "rvm/rvm_use_id_list.h"
 #include "abb/abb.h"
+#include "etm/etm.h"
+#include "etm/etm_api.h"
 
 static void set_initial_state(void)
 {
@@ -37,9 +40,10 @@
 	set_initial_state();
 	/* just for safety, clear any previous BCI hardware state */
 	ABB_Write_Register_on_page(PAGE0, BCICTL2, 0);
-	if (pwr_ctrl->bsim_mode)
+	if (pwr_ctrl->bsim_mode) {
 		bsim_init_percent();
-	else
+		etm_register("BSIM", ETM_BSIM, 0, pwr_ctrl->addr_id, 0);
+	} else
 		pwr_init_discharge();
 
 	/* loop to process messages */