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 2020/04/19 12:56:21 UTC

[GitHub] [mynewt-core] caspermeijn commented on a change in pull request #2275: Battery for PineTime BSP

caspermeijn commented on a change in pull request #2275: Battery for PineTime BSP
URL: https://github.com/apache/mynewt-core/pull/2275#discussion_r410898498
 
 

 ##########
 File path: hw/bsp/pinetime/src/hal_bsp.c
 ##########
 @@ -89,6 +92,51 @@ hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
     return cfg_pri;
 }
 
+static struct adc_dev_cfg hal_bsp_adc_dev_config = {
+    .resolution = ADC_RESOLUTION_10BIT,
+    .oversample = ADC_OVERSAMPLE_DISABLED,
+    .calibrate = false,
+};
+
+static struct adc_chan_cfg hal_bsp_adc_channel_config = {
+    .gain = ADC_GAIN1_6,
+    .reference = ADC_REFERENCE_INTERNAL,
+    .acq_time = ADC_ACQTIME_10US,
+    .pin = NRF_SAADC_INPUT_AIN7,
+    .differential = false,
+    .pin_negative = -1,
+};
+
+static struct battery hal_bsp_battery_dev = {};
 
 Review comment:
   You are right. This is only valid in C++. And if I read the C spec right it will be initialized to zero because of the static declaration.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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