You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/02/22 01:48:03 UTC
[1/5] incubator-mynewt-core git commit: MYNEWT-492;
TBD -> descriptions.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop fa6cc192e -> 4ef28aaaa
MYNEWT-492; TBD -> descriptions.
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/0112f46a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0112f46a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0112f46a
Branch: refs/heads/develop
Commit: 0112f46afa912d63c8560e68dd41e739256f9346
Parents: fa6cc19
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 21 16:36:20 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 21 16:36:20 2017 -0800
----------------------------------------------------------------------
hw/bsp/arduino_primo_nrf52/syscfg.yml | 36 ++++++++---------
hw/bsp/bbc_microbit/syscfg.yml | 28 +++++---------
hw/bsp/bmd200/syscfg.yml | 21 ++++++----
hw/bsp/bmd300eval/syscfg.yml | 22 +++++++----
hw/bsp/ci40/syscfg.yml | 4 +-
hw/bsp/frdm-k64f/syscfg.yml | 62 +++++++++++++++---------------
hw/bsp/nrf51-arduino_101/syscfg.yml | 27 ++++---------
7 files changed, 91 insertions(+), 109 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/arduino_primo_nrf52/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/syscfg.yml b/hw/bsp/arduino_primo_nrf52/syscfg.yml
index 01d2ded..fdbd00b 100644
--- a/hw/bsp/arduino_primo_nrf52/syscfg.yml
+++ b/hw/bsp/arduino_primo_nrf52/syscfg.yml
@@ -21,51 +21,45 @@
syscfg.defs:
OPENOCD_DEBUG:
- description: 'TBD'
+ description: 'Use OpenOCD for JTAG access.'
value: 0
BSP_NRF52:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF52'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 12
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 11
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 0
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 0
UART_1:
- description: 'Bitbanger UART'
+ description: 'Whether to enable bitbanger UART1'
value: 1
UART_1_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART1'
value: 6
UART_1_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART1'
value: 5
- UART_1_PIN_RTS:
- description: 'TBD'
- value: 0
- UART_1_PIN_CTS:
- description: 'TBD'
- value: 0
SPI_0_MASTER:
- description: 'SPI 0 master'
+ description: 'Whether to enable SPI 0 in master mode'
value: 1
restrictions:
- "!SPI_0_SLAVE"
@@ -73,7 +67,7 @@ syscfg.defs:
description: 'SPI 0 (master) SS pin number.'
value: 19
SPI_1_MASTER:
- description: 'SPI 1 master'
+ description: 'Whether to enable SPI 1 in master mode'
value: 0
restrictions:
- "!SPI_1_SLAVE"
@@ -81,12 +75,12 @@ syscfg.defs:
description: 'SPI 1 (master) SS pin number.'
value: -1
SPI_0_SLAVE:
- description: 'SPI 0 slave'
+ description: 'Whether to enable SPI 0 in slave mode'
value: 0
restrictions:
- "!SPI_0_MASTER"
SPI_1_SLAVE:
- description: 'SPI 1 slave'
+ description: 'Whether to enable SPI 1 in slave mode'
value: 0
restrictions:
- "!SPI_1_MASTER"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/bbc_microbit/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bbc_microbit/syscfg.yml b/hw/bsp/bbc_microbit/syscfg.yml
index ff9cee3..0a2d051 100644
--- a/hw/bsp/bbc_microbit/syscfg.yml
+++ b/hw/bsp/bbc_microbit/syscfg.yml
@@ -21,48 +21,38 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768_SYNTH:
- description: 'TBD'
+ description: 'Synthesize 32k clock.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 24
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 25
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 0
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 0
SPI_0_MASTER:
- description: 'SPI 0 master'
+ description: 'Whether to enable SPI 0 in master mode'
value: 0
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 24
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_1_SLAVE:
- description: 'SPI 1 slave'
+ description: 'Whether to enable SPI 1 in slave mode'
value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF51 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/bmd200/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd200/syscfg.yml b/hw/bsp/bmd200/syscfg.yml
index d9650d9..8890a38 100644
--- a/hw/bsp/bmd200/syscfg.yml
+++ b/hw/bsp/bmd200/syscfg.yml
@@ -21,30 +21,35 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 0
+ restrictions:
+ - "!XTAL_32768_SYNTH"
+
XTAL_32768_SYNTH:
- description: 'TBD'
+ description: 'Synthesize 32k clock.'
value: 1
+ restrictions:
+ - "!XTAL_32768"
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 10
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 9
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 11
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 8
SPI_0_MASTER:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/bmd300eval/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/syscfg.yml b/hw/bsp/bmd300eval/syscfg.yml
index 02b29e0..0018ee1 100644
--- a/hw/bsp/bmd300eval/syscfg.yml
+++ b/hw/bsp/bmd300eval/syscfg.yml
@@ -21,32 +21,38 @@
syscfg.defs:
BSP_NRF52:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF52'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 6
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 8
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 5
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 7
UART_1:
- description: 'Bitbanger UART'
+ description: 'Whether to enable bitbanger UART1'
value: 0
+ UART_1_PIN_TX:
+ description: 'TX pin for UART1'
+ value: -1
+ UART_1_PIN_RX:
+ description: 'RX pin for UART1'
+ value: -1
SPI_0_MASTER:
description: 'SPI 0 master'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/ci40/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/ci40/syscfg.yml b/hw/bsp/ci40/syscfg.yml
index ffed5aa..ddcf459 100644
--- a/hw/bsp/ci40/syscfg.yml
+++ b/hw/bsp/ci40/syscfg.yml
@@ -25,9 +25,9 @@ syscfg.defs:
value: 546000000ul
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_1:
- description: 'TBD'
+ description: 'Whether to enable UART1'
value: 1
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/frdm-k64f/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/frdm-k64f/syscfg.yml b/hw/bsp/frdm-k64f/syscfg.yml
index c6c8e30..5b26863 100644
--- a/hw/bsp/frdm-k64f/syscfg.yml
+++ b/hw/bsp/frdm-k64f/syscfg.yml
@@ -21,109 +21,109 @@
syscfg.defs:
BSP_MK64F12:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NXP MK64F12'
value: 1
# UART0 PINS on CMSIS-DAP Interface
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART0 pins'
value: PORTB
UART_0_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART0 pins'
value: kCLOCK_PortB
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 16
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 17
# PINS conflict with SPI0 must choose 1
UART_1:
- description: 'TBD'
+ description: 'Whether to enable UART1'
value: 0
UART_1_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART1 pins'
value: PORTC
UART_1_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART1 pins'
value: kCLOCK_PortC
UART_1_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART1'
value: 3
UART_1_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART1x'
value: 4
# PINS conflict with SPI0 must choose 1
UART_2:
- description: 'TBD'
+ description: 'Whether to enable UART2'
value: 0
UART_2_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART2 pins'
value: PORTD
UART_2_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART2 pins'
value: kCLOCK_PortD
UART_2_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART2'
value: 2
UART_2_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART2'
value: 3
# PINS conflict with ENET0 must choose 1
UART_3:
- description: 'TBD'
+ description: 'Whether to enable UART3'
value: 0
UART_3_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART3 pins'
value: PORTC
UART_3_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART3 pins'
value: kCLOCK_PortC
UART_3_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART3'
value: 16
UART_3_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART3'
value: 17
# PINS conflict with ENET0 must choose 1
UART_4:
- description: 'TBD'
+ description: 'Whether to enable UART4'
value: 0
UART_4_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART4 pins'
value: PORTC
UART_4_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART4 pins'
value: kCLOCK_PortC
UART_4_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART4'
value: 14
UART_4_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART4'
value: 15
# PINS conflict with I2S0 must choose 1
UART_5:
- description: 'TBD'
+ description: 'Whether to enable UART5'
value: 0
UART_5_PORT:
- description: 'TBD'
+ description: 'GPIO port for UART5 pins'
value: PORTE
UART_5_PORT_CLOCK:
- description: 'TBD'
+ description: 'Clock to enable for UART5 pins'
value: kCLOCK_PortE
UART_5_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART5'
value: 9
UART_5_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART5'
value: 8
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0112f46a/hw/bsp/nrf51-arduino_101/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/syscfg.yml b/hw/bsp/nrf51-arduino_101/syscfg.yml
index c513e26..9491b6d 100644
--- a/hw/bsp/nrf51-arduino_101/syscfg.yml
+++ b/hw/bsp/nrf51-arduino_101/syscfg.yml
@@ -21,31 +21,28 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 9
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 11
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 12
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 10
- UART_1:
- description: 'TBD'
- value: 0
SPI_0_MASTER:
description: 'SPI 0 master'
@@ -53,19 +50,9 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 24
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_1_SLAVE:
description: 'SPI 1 slave'
value: 1
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF51 Timer 0'
[5/5] incubator-mynewt-core git commit: bsp/rb-nano2;
configure SPI0 if syscfg says so.
Posted by ma...@apache.org.
bsp/rb-nano2; configure SPI0 if syscfg says so.
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/4ef28aaa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/4ef28aaa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/4ef28aaa
Branch: refs/heads/develop
Commit: 4ef28aaaa7fc24325a34f17ffe97fa2c9a594595
Parents: c9fdcc0
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 21 17:37:35 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 21 17:37:35 2017 -0800
----------------------------------------------------------------------
hw/bsp/rb-nano2/src/hal_bsp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/4ef28aaa/hw/bsp/rb-nano2/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/src/hal_bsp.c b/hw/bsp/rb-nano2/src/hal_bsp.c
index cdcc354..4686167 100644
--- a/hw/bsp/rb-nano2/src/hal_bsp.c
+++ b/hw/bsp/rb-nano2/src/hal_bsp.c
@@ -30,8 +30,10 @@
#include "hal/hal_flash.h"
#include "hal/hal_spi.h"
#include "hal/hal_watchdog.h"
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
#include "os/os_dev.h"
#if MYNEWT_VAL(UART_0)
@@ -165,4 +167,14 @@ hal_bsp_init(void)
OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&os_bsp_uart0_cfg);
assert(rc == 0);
#endif
+
+#if MYNEWT_VAL(SPI_0_MASTER)
+ rc = hal_spi_init(0, (void *)&os_bsp_spi0m_cfg, HAL_SPI_TYPE_MASTER);
+ assert(rc == 0);
+#endif
+
+#if MYNEWT_VAL(SPI_0_SLAVE)
+ rc = hal_spi_init(0, (void *)&os_bsp_spi0s_cfg, HAL_SPI_TYPE_SLAVE);
+ assert(rc == 0);
+#endif
}
[3/5] incubator-mynewt-core git commit: MYNEWT-492;
TBD -> descriptions.
Posted by ma...@apache.org.
MYNEWT-492; TBD -> descriptions.
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/cb6d0cbc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/cb6d0cbc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/cb6d0cbc
Branch: refs/heads/develop
Commit: cb6d0cbc9cc3e3a1346184a4015c40a3abb79120
Parents: e2dd539
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 21 17:36:29 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 21 17:36:29 2017 -0800
----------------------------------------------------------------------
hw/bsp/olimex_stm32-e407_devboard/syscfg.yml | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cb6d0cbc/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml b/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
index d1d19fd..7b2fe59 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
+++ b/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
@@ -21,39 +21,32 @@
syscfg.defs:
ADC_1:
description: "ADC_1"
- value: 1
+ value: 0
ADC_2:
description: "ADC_2"
value: 0
ADC_3:
description: "ADC_3"
- value: 1
+ value: 0
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
- UART_1:
- description: 'TBD'
- value: 0
I2C_0:
description: 'I2C0'
value: 0
- SPI_0:
- description: 'TBD'
- value: 0
-
SPI_0_MASTER:
- description: 'TBD'
+ description: 'Whether to enable SPI 0 in master mode'
value: 0
restrictions:
- - SPI_0
+ - "!SPI_0_SLAVE"
SPI_0_SLAVE:
- description: 'TBD'
+ description: 'Whether to enable SPI 0 in slave mode'
value: 0
restrictions:
- - SPI_0
+ - "!SPI_0_MASTER"
TIMER_0:
description: 'TIMER_0'
[2/5] incubator-mynewt-core git commit: MYNEWT-492;
TBD -> descriptions.
Posted by ma...@apache.org.
MYNEWT-492; TBD -> descriptions.
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/e2dd5391
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e2dd5391
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e2dd5391
Branch: refs/heads/develop
Commit: e2dd5391101c41140b17e2b7bcaae1f63a2ab278
Parents: 0112f46
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 21 17:33:43 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 21 17:33:43 2017 -0800
----------------------------------------------------------------------
hw/bsp/nrf51-blenano/syscfg.yml | 24 +++++++---------------
hw/bsp/nrf51dk-16kbram/syscfg.yml | 24 +++++++---------------
hw/bsp/nrf51dk/syscfg.yml | 24 +++++++---------------
hw/bsp/nrf52840pdk/syscfg.yml | 33 ++++++++++++-------------------
hw/bsp/nrf52dk/syscfg.yml | 35 +++++++++++++--------------------
hw/bsp/nucleo-f401re/syscfg.yml | 14 +++++--------
hw/bsp/rb-nano2/syscfg.yml | 27 +++++++++++--------------
hw/bsp/stm32f4discovery/syscfg.yml | 5 ++++-
hw/bsp/usbmkw41z/syscfg.yml | 2 +-
9 files changed, 69 insertions(+), 119 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nrf51-blenano/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/syscfg.yml b/hw/bsp/nrf51-blenano/syscfg.yml
index 6ff8328..8908bb0 100644
--- a/hw/bsp/nrf51-blenano/syscfg.yml
+++ b/hw/bsp/nrf51-blenano/syscfg.yml
@@ -21,27 +21,27 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 9
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 11
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 8
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 10
SPI_0_MASTER:
@@ -50,19 +50,9 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 24
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_1_SLAVE:
description: 'SPI 1 slave'
value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF51 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nrf51dk-16kbram/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/syscfg.yml b/hw/bsp/nrf51dk-16kbram/syscfg.yml
index 9794dcf..83f29d2 100644
--- a/hw/bsp/nrf51dk-16kbram/syscfg.yml
+++ b/hw/bsp/nrf51dk-16kbram/syscfg.yml
@@ -21,27 +21,27 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 9
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 11
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 8
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 10
SPI_0_MASTER:
@@ -50,19 +50,9 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 24
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_1_SLAVE:
description: 'SPI 1 slave'
value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF51 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nrf51dk/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/syscfg.yml b/hw/bsp/nrf51dk/syscfg.yml
index 5a19cb6..8f13b42 100644
--- a/hw/bsp/nrf51dk/syscfg.yml
+++ b/hw/bsp/nrf51dk/syscfg.yml
@@ -21,27 +21,27 @@
syscfg.defs:
BSP_NRF51:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF51'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 9
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 11
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 8
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 10
SPI_0_MASTER:
@@ -50,19 +50,9 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 24
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_1_SLAVE:
description: 'SPI 1 slave'
value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF51 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nrf52840pdk/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52840pdk/syscfg.yml b/hw/bsp/nrf52840pdk/syscfg.yml
index 4756488..23671b4 100644
--- a/hw/bsp/nrf52840pdk/syscfg.yml
+++ b/hw/bsp/nrf52840pdk/syscfg.yml
@@ -20,32 +20,38 @@
syscfg.defs:
BSP_NRF52840:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF52840'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 6
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 8
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 5
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 7
UART_1:
description: 'Bitbanger UART'
value: 0
+ UART_1_PIN_TX:
+ description: 'TX pin for UART1'
+ value: -1
+ UART_1_PIN_RX:
+ description: 'RX pin for UART1'
+ value: -1
SPI_0_MASTER:
description: 'SPI 0 master'
@@ -55,24 +61,11 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 44
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_0_SLAVE:
description: 'SPI 0 slave'
value: 0
restrictions:
- "!SPI_0_MASTER"
- SPI_1_SLAVE:
- description: 'SPI 1 slave'
- value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF52840 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nrf52dk/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/syscfg.yml b/hw/bsp/nrf52dk/syscfg.yml
index 1de4c56..696ddec 100644
--- a/hw/bsp/nrf52dk/syscfg.yml
+++ b/hw/bsp/nrf52dk/syscfg.yml
@@ -20,32 +20,38 @@
syscfg.defs:
BSP_NRF52:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF52'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 6
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 8
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 5
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 0
UART_1:
- description: 'Bitbanger UART'
+ description: 'Whether to enable bitbanger UART1'
value: 0
+ UART_1_PIN_TX:
+ description: 'TX pin for UART1'
+ value: -1
+ UART_1_PIN_RX:
+ description: 'RX pin for UART1'
+ value: -1
SPI_0_MASTER:
description: 'SPI 0 master'
@@ -55,24 +61,11 @@ syscfg.defs:
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 22
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- restrictions:
- - "!SPI_1_SLAVE"
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_0_SLAVE:
description: 'SPI 0 slave'
value: 0
restrictions:
- "!SPI_0_MASTER"
- SPI_1_SLAVE:
- description: 'SPI 1 slave'
- value: 0
- restrictions:
- - "!SPI_1_MASTER"
TIMER_0:
description: 'NRF52 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/nucleo-f401re/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/syscfg.yml b/hw/bsp/nucleo-f401re/syscfg.yml
index 0747b1b..c27ebd7 100644
--- a/hw/bsp/nucleo-f401re/syscfg.yml
+++ b/hw/bsp/nucleo-f401re/syscfg.yml
@@ -19,28 +19,24 @@
syscfg.defs:
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
I2C_0:
description: 'I2C0'
value: 0
- SPI_0:
- description: 'TBD'
- value: 0
-
SPI_0_MASTER:
- description: 'TBD'
+ description: 'Whether to enable SPI 0 in master mode'
value: 0
restrictions:
- - SPI_0
+ - "!SPI_0_SLAVE"
SPI_0_SLAVE:
- description: 'TBD'
+ description: 'Whether to enable SPI 0 in slave mode'
value: 0
restrictions:
- - SPI_0
+ - "!SPI_0_MASTER"
TIMER_0:
description: 'TIMER_0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/rb-nano2/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/syscfg.yml b/hw/bsp/rb-nano2/syscfg.yml
index e3105ad..f7cf2fc 100644
--- a/hw/bsp/rb-nano2/syscfg.yml
+++ b/hw/bsp/rb-nano2/syscfg.yml
@@ -21,47 +21,42 @@
syscfg.defs:
BSP_NRF52:
- description: 'TBD'
+ description: 'Set to indicate that BSP has NRF52'
value: 1
XTAL_32768:
- description: 'TBD'
+ description: 'External 32k oscillator available.'
value: 1
UART_0:
- description: 'TBD'
+ description: 'Whether to enable UART0'
value: 1
UART_0_PIN_TX:
- description: 'TBD'
+ description: 'TX pin for UART0'
value: 29
UART_0_PIN_RX:
- description: 'TBD'
+ description: 'RX pin for UART0'
value: 30
UART_0_PIN_RTS:
- description: 'TBD'
+ description: 'RTS pin for UART0'
value: 2
UART_0_PIN_CTS:
- description: 'TBD'
+ description: 'CTS pin for UART0'
value: 28
SPI_0_MASTER:
description: 'SPI 0 master'
value: 0
+ restrictions:
+ - "!SPI_0_SLAVE"
SPI_0_MASTER_SS_PIN:
description: 'SPI 0 (master) SS pin number.'
value: 22
- SPI_1_MASTER:
- description: 'SPI 1 master'
- value: 0
- SPI_1_MASTER_SS_PIN:
- description: 'SPI 1 (master) SS pin number.'
- value: -1
SPI_0_SLAVE:
description: 'SPI 0 slave'
value: 0
- SPI_1_SLAVE:
- description: 'SPI 1 slave'
- value: 0
+ restrictions:
+ - "!SPI_0_MASTER"
TIMER_0:
description: 'NRF52 Timer 0'
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/stm32f4discovery/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/syscfg.yml b/hw/bsp/stm32f4discovery/syscfg.yml
index 8b3feba..5df91a7 100644
--- a/hw/bsp/stm32f4discovery/syscfg.yml
+++ b/hw/bsp/stm32f4discovery/syscfg.yml
@@ -19,8 +19,11 @@
syscfg.defs:
UART_0:
- description: 'TBD'
+ description: 'UART 0'
value: 1
+ TIMER_0:
+ description: 'Timer 0'
+ value: 0
syscfg.vals:
REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2dd5391/hw/bsp/usbmkw41z/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/usbmkw41z/syscfg.yml b/hw/bsp/usbmkw41z/syscfg.yml
index b3e024e..958006c 100644
--- a/hw/bsp/usbmkw41z/syscfg.yml
+++ b/hw/bsp/usbmkw41z/syscfg.yml
@@ -21,7 +21,7 @@
syscfg.defs:
BSP_USBMKW41Z:
- description: 'TBD'
+ description: 'Set to indicate that BSP has MKW41Z'
value: 1
syscfg.vals:
[4/5] incubator-mynewt-core git commit:
bsp/olimex_stm32-e407_devboard; allow building BSP without ADCs, UART0.
Posted by ma...@apache.org.
bsp/olimex_stm32-e407_devboard; allow building BSP without ADCs, UART0.
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/c9fdcc0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c9fdcc0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c9fdcc0e
Branch: refs/heads/develop
Commit: c9fdcc0e984567347b036f92ed6bc7a019866e86
Parents: cb6d0cb
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 21 17:36:52 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 21 17:36:52 2017 -0800
----------------------------------------------------------------------
hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c | 48 ++++++++++----------
1 file changed, 23 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c9fdcc0e/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c b/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c
index 9d50e8c..d0bcc39 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c
+++ b/hw/bsp/olimex_stm32-e407_devboard/src/hal_bsp.c
@@ -26,9 +26,13 @@
#include "stm32f4xx_hal_adc.h"
#include "flash_map/flash_map.h"
#include "os/os_dev.h"
+#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
+#endif
+#if MYNEWT_VAL(ADC_1) || MYNEWT_VAL(ADC_2) || MYNEWT_VAL(ADC_3)
#include "adc_stm32f4/adc_stm32f4.h"
+#endif
#include "hal/hal_i2c.h"
#include "hal/hal_timer.h"
#include "hal/hal_bsp.h"
@@ -40,7 +44,9 @@
#include "mcu/stm32f4_bsp.h"
#include "mcu/stm32f4xx_mynewt_hal.h"
-static struct uart_dev hal_uart0;
+#if MYNEWT_VAL(UART_0)
+struct uart_dev hal_uart0;
+#endif
/* XXX should not be here */
@@ -54,8 +60,6 @@ struct adc_dev my_dev_adc2;
struct adc_dev my_dev_adc3;
#endif
-struct stm32f4_uart_cfg;
-
#if MYNEWT_VAL(ADC_1)
/*
* adc_handle is defined earlier because the DMA handle's
@@ -269,21 +273,19 @@ struct stm32f4_hal_spi_cfg spi0_cfg = {
.irq_prio = 2
};
#endif
-
-static const struct stm32f4_uart_cfg uart_cfg[UART_CNT] = {
- [0] = {
- .suc_uart = USART6,
- .suc_rcc_reg = &RCC->APB2ENR,
- .suc_rcc_dev = RCC_APB2ENR_USART6EN,
- .suc_pin_tx = MCU_GPIO_PORTC(6), /* PC6 */
- .suc_pin_rx = MCU_GPIO_PORTC(7), /* PC7 */
- .suc_pin_rts = -1,
- .suc_pin_cts = -1,
- .suc_pin_af = GPIO_AF8_USART6,
- .suc_irqn = USART6_IRQn
- }
+#if MYNEWT_VAL(UART_0)
+static const struct stm32f4_uart_cfg uart_cfg0 = {
+ .suc_uart = USART6,
+ .suc_rcc_reg = &RCC->APB2ENR,
+ .suc_rcc_dev = RCC_APB2ENR_USART6EN,
+ .suc_pin_tx = MCU_GPIO_PORTC(6), /* PC6 */
+ .suc_pin_rx = MCU_GPIO_PORTC(7), /* PC7 */
+ .suc_pin_rts = -1,
+ .suc_pin_cts = -1,
+ .suc_pin_af = GPIO_AF8_USART6,
+ .suc_irqn = USART6_IRQn
};
-
+#endif
static const struct hal_bsp_mem_dump dump_cfg[] = {
[0] = {
.hbmd_start = &_ram_start,
@@ -295,13 +297,6 @@ static const struct hal_bsp_mem_dump dump_cfg[] = {
}
};
-const struct stm32f4_uart_cfg *
-bsp_uart_config(int port)
-{
- assert(port < UART_CNT);
- return &uart_cfg[port];
-}
-
const struct hal_flash *
hal_bsp_flash_dev(uint8_t id)
{
@@ -348,6 +343,7 @@ hal_bsp_init(void)
{
int rc;
+ (void)rc;
#if MYNEWT_VAL(SPI_0_MASTER)
rc = hal_spi_init(0, &spi0_cfg, HAL_SPI_TYPE_MASTER);
assert(rc == 0);
@@ -358,9 +354,11 @@ hal_bsp_init(void)
assert(rc == 0);
#endif
+#if MYNEWT_VAL(UART_0)
rc = os_dev_create((struct os_dev *) &hal_uart0, CONSOLE_UART,
- OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)bsp_uart_config(0));
+ OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&uart_cfg0);
assert(rc == 0);
+#endif
#if MYNEWT_VAL(ADC_1)
rc = os_dev_create((struct os_dev *) &my_dev_adc1, "adc1",