zephyr/samples/bluetooth/hci_spi
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
..
boards
src device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00

README.rst

.. _bluetooth-hci-spi-sample:

Bluetooth: HCI SPI
##################

Overview
********

Expose Zephyr Bluetooth Controller support over SPI to another device/CPU using
the Zephyr SPI HCI transport protocol (similar to BlueNRG).

Requirements
************

* A board with SPI slave, GPIO and BLE support.

Building and Running
********************

In order to use this application, you need a board with a Bluetooth
controller and SPI slave drivers, and a spare GPIO to use as an
interrupt line to the SPI master.

You then need to ensure that your :ref:`devicetree <dt-guide>`
settings provide a definition for the slave HCI SPI device::

	bt-hci@0 {
		compatible = "zephyr,bt-hci-spi-slave";
		...
	};

You can then build this application and flash it onto your board in
the usual way; see :ref:`boards` for board-specific building and
flashing information.

You will also need a separate chip acting as BT HCI SPI master. This
application is compatible with the HCI SPI master driver provided by
Zephyr's Bluetooth HCI driver core; see the help associated with the
BT_SPI configuration option for more information.

Refer to :ref:`bluetooth-samples` for general Bluetooth information, and
to :ref:`96b_carbon_nrf51_bluetooth` for instructions specific to the
96Boards Carbon board.