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/18 13:31:43 UTC

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

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

 ##########
 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:
   It would be the first time in mynewt code to put = {}; for non stack variable. Not that there is something wrong with this it's just not happened before.

----------------------------------------------------------------
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