You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/07/12 18:27:25 UTC

[GitHub] kasjer commented on a change in pull request #1266: battery/adc: Add activation pin support

kasjer commented on a change in pull request #1266: battery/adc: Add activation pin support
URL: https://github.com/apache/mynewt-core/pull/1266#discussion_r202134916
 
 

 ##########
 File path: hw/battery/src/battery_adc.c
 ##########
 @@ -104,6 +122,18 @@ battery_adc_open(struct os_dev *dev, uint32_t timeout, void *arg)
         /* Setup channel configuration to use for battery voltage */
         adc_chan_config(bat_adc->adc_dev, bat_adc->cfg.channel,
                 bat_adc->cfg.adc_channel_cfg);
+
+        /* Additional GPIO needed before measurement ? */
+        if (bat_adc->cfg.activation_pin != -1) {
+            /* Should it be activate once or before each measurement */
+            if (bat_adc->cfg.activation_pin_on_open) {
 
 Review comment:
   I though it could be useful but maybe it is too much. I'll remove it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services