You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by be...@apache.org on 2021/02/05 18:37:41 UTC
[mynewt-core] branch master updated: charge-control: Fix to allow
usage of an alternate event queue.
This is an automated email from the ASF dual-hosted git repository.
benmccrea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 01d9008 charge-control: Fix to allow usage of an alternate event queue.
new 1a19155 Merge pull request #2471 from benmccrea/fix-cc-alt-eventq
01d9008 is described below
commit 01d9008875dd262830e16d4fc8775ac56a9f0cfb
Author: Ben McCrea <bm...@juul.com>
AuthorDate: Wed Feb 3 12:54:00 2021 -0800
charge-control: Fix to allow usage of an alternate event queue.
---
hw/charge-control/src/charge_control.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/charge-control/src/charge_control.c b/hw/charge-control/src/charge_control.c
index 683e701..8b29543 100644
--- a/hw/charge-control/src/charge_control.c
+++ b/hw/charge-control/src/charge_control.c
@@ -181,6 +181,10 @@ static struct os_event charge_control_read_event = {
.ev_cb = charge_control_read_ev_cb,
};
+#ifdef MYNEWT_VAL_CHARGE_CONTROL_MGR_EVQ
+extern struct os_eventq MYNEWT_VAL(CHARGE_CONTROL_MGR_EVQ);
+#endif
+
/* =================================================================
* ====================== PKG ======================================
* =================================================================
@@ -210,7 +214,7 @@ charge_control_read_ev_cb(struct os_event *ev)
struct charge_control_read_ev_ctx *ccrec;
ccrec = ev->ev_arg;
- rc = charge_control_read(ccrec->ccrec_charge_control, ccrec->ccrec_type,
+ rc = charge_control_read(ccrec->ccrec_charge_control, ccrec->ccrec_type,
NULL, NULL, OS_TIMEOUT_NEVER);
assert(rc == 0);
}
@@ -801,7 +805,7 @@ charge_control_mgr_init(void)
struct os_timezone ostz;
#ifdef MYNEWT_VAL_CHARGE_CONTROL_MGR_EVQ
- charge_control_mgr_evq_set(MYNEWT_VAL(CHARGE_CONTROL_MGR_EVQ));
+ charge_control_mgr_evq_set(&MYNEWT_VAL(CHARGE_CONTROL_MGR_EVQ));
#else
charge_control_mgr_evq_set(os_eventq_dflt_get());
#endif