Disable all BSP peripherals by default.

If an app needs a peripheral, it should enable it in its syscfg.
Pulling in everything be default was adding too much code size.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/6c48ecd7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/6c48ecd7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/6c48ecd7

Branch: refs/heads/develop
Commit: 6c48ecd7f002a483232de90bd4481a85b9fa1aed
Parents: 8371baa
Author: Christopher Collins <ccoll...@apache.org>
Authored: Wed Sep 21 20:06:19 2016 -0700
Committer: Christopher Collins <ccoll...@apache.org>
Committed: Wed Sep 21 20:13:48 2016 -0700

----------------------------------------------------------------------
 hw/bsp/arduino_primo_nrf52/pkg.yml        | 4 ++--
 hw/bsp/bmd300eval/pkg.yml                 | 4 ++--
 hw/bsp/nrf51-arduino_101/pkg.yml          | 4 ++--
 hw/bsp/nrf51-blenano/pkg.yml              | 2 +-
 hw/bsp/nrf51dk-16kbram/pkg.yml            | 4 ++--
 hw/bsp/nrf52dk/pkg.yml                    | 4 ++--
 hw/bsp/nrf52dk/src/os_bsp.c               | 5 ++++-
 hw/bsp/olimex_stm32-e407_devboard/pkg.yml | 4 ++--
 8 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/arduino_primo_nrf52/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/pkg.yml 
b/hw/bsp/arduino_primo_nrf52/pkg.yml
index 724468b..843ad6c 100644
--- a/hw/bsp/arduino_primo_nrf52/pkg.yml
+++ b/hw/bsp/arduino_primo_nrf52/pkg.yml
@@ -70,7 +70,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -115,7 +115,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/bmd300eval/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/pkg.yml b/hw/bsp/bmd300eval/pkg.yml
index cd1af60..8849cdb 100644
--- a/hw/bsp/bmd300eval/pkg.yml
+++ b/hw/bsp/bmd300eval/pkg.yml
@@ -69,7 +69,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -89,7 +89,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/nrf51-arduino_101/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/pkg.yml b/hw/bsp/nrf51-arduino_101/pkg.yml
index 7719a9f..e451a2e 100644
--- a/hw/bsp/nrf51-arduino_101/pkg.yml
+++ b/hw/bsp/nrf51-arduino_101/pkg.yml
@@ -67,7 +67,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -87,7 +87,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/nrf51-blenano/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/pkg.yml b/hw/bsp/nrf51-blenano/pkg.yml
index 494d265..55f3e4d 100644
--- a/hw/bsp/nrf51-blenano/pkg.yml
+++ b/hw/bsp/nrf51-blenano/pkg.yml
@@ -69,7 +69,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/nrf51dk-16kbram/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/pkg.yml b/hw/bsp/nrf51dk-16kbram/pkg.yml
index 6b65dfb..991c55c 100644
--- a/hw/bsp/nrf51dk-16kbram/pkg.yml
+++ b/hw/bsp/nrf51dk-16kbram/pkg.yml
@@ -68,7 +68,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -88,7 +88,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/nrf52dk/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/pkg.yml b/hw/bsp/nrf52dk/pkg.yml
index e80dea9..e3d81c0 100644
--- a/hw/bsp/nrf52dk/pkg.yml
+++ b/hw/bsp/nrf52dk/pkg.yml
@@ -69,7 +69,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -102,7 +102,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/nrf52dk/src/os_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/src/os_bsp.c b/hw/bsp/nrf52dk/src/os_bsp.c
index 90798fe..80f8bac 100644
--- a/hw/bsp/nrf52dk/src/os_bsp.c
+++ b/hw/bsp/nrf52dk/src/os_bsp.c
@@ -40,9 +40,12 @@
 #include "app_util_platform.h"
 #include "nrf.h"
 #include "app_error.h"
-#include "adc_nrf52/adc_nrf52.h"
 #include "nrf_drv_saadc.h"
 
+#if MYNEWT_VAL(ADC_0)
+#include "adc_nrf52/adc_nrf52.h"
+#endif
+
 static struct flash_area bsp_flash_areas[] = {
     [FLASH_AREA_BOOTLOADER] = {
         .fa_flash_id = 0,       /* internal flash */

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6c48ecd7/hw/bsp/olimex_stm32-e407_devboard/pkg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/pkg.yml 
b/hw/bsp/olimex_stm32-e407_devboard/pkg.yml
index 1842a85..a06aaf0 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/pkg.yml
+++ b/hw/bsp/olimex_stm32-e407_devboard/pkg.yml
@@ -57,7 +57,7 @@ pkg.syscfg_defs:
 
     ADC_0:
         description: 'TBD'
-        value:  1
+        value:  0
     ADC_0_RESOLUTION:
         description: 'TBD'
         value: 'SAADC_CONFIG_RESOLUTION'
@@ -77,7 +77,7 @@ pkg.syscfg_defs:
 
     SPI_MASTER:
         description: 'TBD'
-        value:  1
+        value:  0
     SPI_SLAVE:
         description: 'TBD'
         value:  0

Reply via email to