You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/12/03 12:42:21 UTC

[mynewt-core] 10/15: hw/charge-control: Add bus driver support

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit e38657e97e677ef433bb30d570cd1235948f9de9
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Nov 23 17:40:43 2018 +0100

    hw/charge-control: Add bus driver support
---
 hw/charge-control/include/charge-control/charge_control.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/charge-control/include/charge-control/charge_control.h b/hw/charge-control/include/charge-control/charge_control.h
index 729f885..1a3c1a0 100644
--- a/hw/charge-control/include/charge-control/charge_control.h
+++ b/hw/charge-control/include/charge-control/charge_control.h
@@ -364,8 +364,10 @@ struct charge_control {
     /* Charge controller last reading timestamp */
     struct charge_control_timestamp cc_sts;
 
+#if !MYNEWT_VAL(BUS_DRIVER_PRESENT)
     /* Charge controller interface structure */
     struct charge_control_itf cc_itf;
+#endif
 
     /* A list of listeners that are registered to receive data from this
      * charge controller
@@ -511,6 +513,7 @@ charge_control_check_type(struct charge_control *cc,
     return (cc->cc_types & cc->cc_mask & type);
 }
 
+#if !MYNEWT_VAL(BUS_DRIVER_PRESENT)
 /**
  * Set interface type and number
  *
@@ -530,6 +533,7 @@ charge_control_set_interface(struct charge_control *cc,
 
     return (0);
 }
+#endif
 
 /**
  * Read the configuration for the charge control type "type," and return the