Skip to content

Instantly share code, notes, and snippets.

@mbolivar
Created August 14, 2017 15:31
Show Gist options
  • Save mbolivar/729dc895e1d36d272491d2efa9ad53e3 to your computer and use it in GitHub Desktop.
Save mbolivar/729dc895e1d36d272491d2efa9ad53e3 to your computer and use it in GitHub Desktop.
diff --git a/boards/arm/96b_carbon/doc/96b_carbon.rst b/boards/arm/96b_carbon/doc/96b_carbon.rst
index fc59164cc..ce4f2830a 100644
--- a/boards/arm/96b_carbon/doc/96b_carbon.rst
+++ b/boards/arm/96b_carbon/doc/96b_carbon.rst
@@ -8,10 +8,10 @@ Overview
Zephyr applications use the 96b_carbon configuration to run on the 96Boards
Carbon hardware. It is based on the STMicroelectronics STM32F401RET Cortex-M4
-CPU and also contains a nRF51832 chip connected over SPI for BLE connectivity.
+CPU and also contains a nRF51822 chip connected over SPI for BLE connectivity.
The 96Boards Carbon board is built with two chips: an STMicroelectronics
-STM32F401RET Cortex-M4 CPU and an nRF51832 chip connected to
+STM32F401RET Cortex-M4 CPU and an nRF51822 chip connected to
the Cortex-M4 CPU over SPI for Bluetooth LE connectivity. Even though
both chips exist on the same physical board, they must be programmed
separately:
@@ -23,13 +23,13 @@ separately:
I/O headers.
- The ``96b_carbon_nrf51`` configuration should be used for programming
- the secondary nRF51832 chip. Most users will likely not develop
+ the secondary nRF51822 chip. Most users will likely not develop
applications for this chip, since Zephyr already provides a
- sample application that can be flashed onto the nRF51832
+ sample application that can be flashed onto the nRF51822
to provide Bluetooth functionality to applications on the main
STM32F401RET chip.
-For instructions on how to set up the nRF51832 to develop Bluetooth
+For instructions on how to set up the nRF51822 to develop Bluetooth
applications, see :ref:`96b_carbon_nrf51_bluetooth`.
After you have flashed your nRF51, you can perform basic validation
@@ -66,7 +66,7 @@ Hardware
- SDIO
- USB 2.0 OTG FS
- DMA Controller
-- Bluetooth LE over SPI, provided by nRF51832
+- Bluetooth LE over SPI, provided by nRF51822
More information about STM32F401RE can be found here:
- `STM32F401RE on www.st.com`_
diff --git a/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig b/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig
index 28a39b6c1..e476ea356 100644
--- a/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig
+++ b/boards/arm/96b_carbon_nrf51/96b_carbon_nrf51_defconfig
@@ -17,9 +17,9 @@ CONFIG_UART_CONSOLE=y
# bluetooth
CONFIG_BT=y
CONFIG_BT_CTLR=y
-CONFIG_BT_CONTROLLER_TO_HOST_SPI_DEV_NAME="SPI_1"
-CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME="GPIO_0"
-CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN=28
+CONFIG_BT_CTLR_TO_HOST_SPI_DEV_NAME="SPI_1"
+CONFIG_BT_CTLR_TO_HOST_SPI_IRQ_DEV_NAME="GPIO_0"
+CONFIG_BT_CTLR_TO_HOST_SPI_IRQ_PIN=28
# spi
CONFIG_SPI=y
diff --git a/boards/arm/96b_carbon_nrf51/doc/96b_carbon_nrf51.rst b/boards/arm/96b_carbon_nrf51/doc/96b_carbon_nrf51.rst
index a1c18ab34..772b6ae2a 100644
--- a/boards/arm/96b_carbon_nrf51/doc/96b_carbon_nrf51.rst
+++ b/boards/arm/96b_carbon_nrf51/doc/96b_carbon_nrf51.rst
@@ -125,21 +125,21 @@ Providing Bluetooth to 96b_carbon
*********************************
This 96b_carbon_nrf51 Zephyr configuration can be used to provide
-Bluetooth functionality from the secondary nRF51832 chip to the
+Bluetooth functionality from the secondary nRF51822 chip to the
primary STM32F401RE chip on the :ref:`96b_carbon_board`.
To do this, build the ``samples/bluetooth/hci_spi/`` application
provided with Zephyr with ``BOARD=96b_carbon_nrf51``, then flash it to
-the nRF51832 chip using the instructions :ref:`above
+the nRF51822 chip using the instructions :ref:`above
<96b_carbon_nrf51_programming>`. (For instructions on how to build a
Zephyr application, see :ref:`build_an_application`.)
.. warning::
- Be sure to flash the hci_spi application to the nRF51832 chip and
+ Be sure to flash the hci_spi application to the nRF51822 chip and
not to the main STM32F401RET chip. While both chips are supported
by Zephyr, the hci_spi application providing Bluetooth support will
- only run on the nRF51832 chip.
+ only run on the nRF51822 chip.
References
**********
diff --git a/samples/bluetooth/hci_spi/README.rst b/samples/bluetooth/hci_spi/README.rst
index 32843031b..77a46f995 100644
--- a/samples/bluetooth/hci_spi/README.rst
+++ b/samples/bluetooth/hci_spi/README.rst
@@ -25,13 +25,13 @@ is supported by this sample application.
You then need to ensure that your :ref:`application_configuration`
provides the Kconfig values defining these peripherals:
-- BT_CONTROLLER_TO_HOST_SPI_DEV_NAME: name of the SPI device on your
+- BT_CTLR_TO_HOST_SPI_DEV_NAME: name of the SPI device on your
board, which interfaces in slave mode with the BT HCI SPI driver.
-- BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME: name of the GPIO device
+- BT_CTLR_TO_HOST_SPI_IRQ_DEV_NAME: name of the GPIO device
which contains the interrupt pin to the SPI master.
-- BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN: pin number on the GPIO device to
+- BT_CTLR_TO_HOST_SPI_IRQ_PIN: pin number on the GPIO device to
use as an interrupt line to the SPI master.
You can then build this application and flash it onto your board in
diff --git a/samples/bluetooth/hci_spi/src/main.c b/samples/bluetooth/hci_spi/src/main.c
index c71baabfc..8cbd5b663 100644
--- a/samples/bluetooth/hci_spi/src/main.c
+++ b/samples/bluetooth/hci_spi/src/main.c
@@ -47,9 +47,9 @@
#define PACKET_TYPE 0
#define EVT_BLUE_INITIALIZED 0x01
-#define SPI_HCI_DEV_NAME CONFIG_BT_CONTROLLER_TO_HOST_SPI_DEV_NAME
-#define GPIO_IRQ_DEV_NAME CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME
-#define GPIO_IRQ_PIN CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN
+#define SPI_HCI_DEV_NAME CONFIG_BT_CTLR_TO_HOST_SPI_DEV_NAME
+#define GPIO_IRQ_DEV_NAME CONFIG_BT_CTLR_TO_HOST_SPI_IRQ_DEV_NAME
+#define GPIO_IRQ_PIN CONFIG_BT_CTLR_TO_HOST_SPI_IRQ_PIN
/* Needs to be aligned with the SPI master buffer size */
#define SPI_MAX_MSG_LEN 255
@@ -63,18 +63,18 @@ static u8_t txmsg[SPI_MAX_MSG_LEN];
NET_BUF_POOL_DEFINE(cmd_tx_pool, CONFIG_BT_HCI_CMD_COUNT, CMD_BUF_SIZE,
BT_BUF_USER_DATA_MIN, NULL);
-#if defined(CONFIG_BT_CONTROLLER)
-#define BT_L2CAP_MTU (CONFIG_BT_CONTROLLER_TX_BUFFER_SIZE - \
+#if defined(CONFIG_BT_CTLR)
+#define BT_L2CAP_MTU (CONFIG_BT_CTLR_TX_BUFFER_SIZE - \
BT_L2CAP_HDR_SIZE)
#else
#define BT_L2CAP_MTU 65 /* 64-byte public key + opcode */
-#endif /* CONFIG_BT_CONTROLLER */
+#endif /* CONFIG_BT_CTLR */
/* Data size needed for ACL buffers */
#define BT_BUF_ACL_SIZE BT_L2CAP_BUF_SIZE(BT_L2CAP_MTU)
-#if defined(CONFIG_BT_CONTROLLER_TX_BUFFERS)
-#define TX_BUF_COUNT CONFIG_BT_CONTROLLER_TX_BUFFERS
+#if defined(CONFIG_BT_CTLR_TX_BUFFERS)
+#define TX_BUF_COUNT CONFIG_BT_CTLR_TX_BUFFERS
#else
#define TX_BUF_COUNT 6
#endif
diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig
index d88644c07..9e82343ec 100644
--- a/subsys/bluetooth/Kconfig
+++ b/subsys/bluetooth/Kconfig
@@ -120,7 +120,7 @@ config BT_CTLR_TO_HOST_UART_DEV_NAME
# TODO add DTS support, once SPI node definitions are available.
-config BT_CONTROLLER_TO_HOST_SPI_DEV_NAME
+config BT_CTLR_TO_HOST_SPI_DEV_NAME
string "Device Name of SPI Device to an external Bluetooth Host"
default "SPI_0"
depends on SPI && BT_HCI_RAW
@@ -129,7 +129,7 @@ config BT_CONTROLLER_TO_HOST_SPI_DEV_NAME
to an external Bluetooth Host when Zephyr is acting as a Bluetooth
Controller.
-config BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME
+config BT_CTLR_TO_HOST_SPI_IRQ_DEV_NAME
string "Device Name of SPI IRQ to an external Bluetooth Host"
default "GPIO_0"
depends on SPI && BT_HCI_RAW
@@ -138,7 +138,7 @@ config BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME
notify an external Bluetooth Host when Zephyr is acting as a
Bluetooth Controller.
-config BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN
+config BT_CTLR_TO_HOST_SPI_IRQ_PIN
int "SPI IRQ line number to an external Bluetooth Host"
default 0
depends on SPI && BT_HCI_RAW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment