Commit graph

19237 commits

Author SHA1 Message Date
Marcus Shawcroft
4117ac2ba2 drivers:config: Fix help text format.
The correct layout for help text is <TAB><SPACE><SPACE>.

Change-Id: Ief4167e75709e358089f701041ac06386351f423
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 12:35:19 +00:00
Marcus Shawcroft
c49ad10273 soc:mk64f12: Enable RANDOM_KSDK driver by default if RANDOM_GENERATOR enabled.
The mk64f12 provides RNGA hardware. Follow the implementation pattern
used by various other driver classes and enable the RANDOM KSDK shim
driver if the RANDOM driver is enabled.

Change-Id: I46bdf16cf1c48937011fb1b0e4c292615efd4c95
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 12:35:18 +00:00
Marcus Shawcroft
989f216357 grove/light_sensor: Limit name space, add static.
Change-Id: I4defcdee69a20ff7a9a5120f96a13ecc747ea5d1
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:55:46 +00:00
Marcus Shawcroft
cfc5345ac6 grove/light_sensor: Make driver_api structure const.
Change-Id: Ib06404fa80bdce797b2446ce13468193241e2f7a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:55:45 +00:00
Marcus Shawcroft
d8d5cb172d grove/temperature_sensor: Limit name space, add static.
Change-Id: I81167e7363aaaebfcf861a60af0f9fca214d3dec
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:55:45 +00:00
Marcus Shawcroft
dfaeb79996 grove/temperature_sensor: Make driver_api structure const.
Change-Id: I7f7223bed0f5be955000bad0256bc29f5a89bc6b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:55:45 +00:00
Marcus Shawcroft
db20018bad tests: Add FXOS8700 sensor to driver build_all test.
Change-Id: I60f62d54b3743335ae80bbb58b2c4ce690b43f41
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:54:45 +00:00
Marcus Shawcroft
914432853a driver/gpio/qmsi: Limit name space, add static.
Change-Id: I77133e665cdc4995db83302389ecf64d79b08f35
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:54:18 +00:00
Marcus Shawcroft
925a46fd6d gpio/sch: Limit name space, add static.
Change-Id: I16563e2162b2cc9de649663d04a813ab765c3253
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:54:17 +00:00
Marcus Shawcroft
56319c9567 gpio/sch: Make driver_api structure const.
Change-Id: I4866aa02fe6fb8d8a6260bd01fda60c9962e89f8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:54:17 +00:00
Marcus Shawcroft
f35d0e6ead gpio/pcal9535a: Limit name space, add static.
Change-Id: I474bad1a44efda66cd2e324483742a257fac77e2
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 10:54:16 +00:00
Johan Hedberg
4a3db55a54 Bluetooth: Fix license header in l2cap.h and rfcomm.h
The header was always supposed to be Apache 2 and not 3-Clause BSD.

Change-Id: I82f319edfc7a76323b2b409fadc90e270d7f1cad
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 13:16:39 +03:00
Luiz Augusto von Dentz
3617d300dc Bluetooth: GATT: Add proper check for connection state
All API's receiving bt_conn as parameter shall check if that is in fact
connected.

Change-Id: Ia96c0d4f49d09fa6559f62ce69547636ad346e64
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-28 10:49:56 +03:00
Sathish Narasimman
a75a523a8e Bluetooth: Generic AT command implementation
This patch provides basic functions to send and parse the AT commands.
This patch is the basic version developed with reference to Bluetooth
Handsfree profile.

Change-Id: Ib44774fb0c6f8ce1639d464f12082af8bde72013
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
2016-10-28 07:42:16 +00:00
Szymon Janc
fb5424392b Bluetooth: Use unified kernel build for tests and samples
This makes all Bluetooth samples and tests being build with unified
kernel. main() is now executed from init thread and specifying task
for it in mdef file is no longer needed. By default main stack is
1024 bytes and this should be enough for BT samples.

Change-Id: I6674eea2c028b78ada5190acef72937186738af2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:30:57 +02:00
Marcus Shawcroft
15dbaa8e90 gpio/k64: Fix Kconfig help text formatting.
Change-Id: I8c1e155a152343eaf680be5f8385548058a95c47
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 07:02:20 +01:00
Marcus Shawcroft
7df2727545 gpio/k64: Fix type in GPIO_K64_C_DEV_NAME text.
Change-Id: Ie65c747467890d9f25dc9795c23eaf39175d14ae
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-28 07:02:12 +01:00
Johan Hedberg
4599255871 Bluetooth: drivers/Kconfig: Fix inconsistency issues
Fix issues with tab vs space as well as missing license/copyright
header in hci/Kconfig.

Change-Id: Id766308dc8eda2d598ea749e5e0d2166014db929
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
326901397f Bluetooth: samples/hci-uart: Make sure we yield in tx_fiber
Whenever the writer of a FIFO is an ISR and the reader a fiber it's
important to make sure that we give the chance for other fibers to run
in case the FIFO keeps getting new data from the ISR without ever
running empty.

Change-Id: I6b40461713d4acfdc6fcec13ff90c9697ff01935
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
6989bf88e1 Bluetooth: Rename bt_driver to bt_hci_driver
The bt_driver API was created when Zephyr only had a Bluetooth host
stack, but no controller-side functionality. The only "driver" that
was needed for the host was the HCI driver, and hence "HCI" was
omitted from the name.

With support both for host and controller Zephyr will be getting more
Bluetooth driver types, in particular radio drivers. To prepare for
this, move all HCI drivers to drivers/bluetooth/hci/ and rename the
bt_driver API bt_hci_driver.

Change-Id: I82829da80aa61f26c2bb2005380f1e88d069ac7d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
d1fe8e0189 Bluetooth: Controller: Fix net_buf memory leak in RX path
Since RSSI events trigger interrupts and signal the RX path
semaphore with a resulting event lenght of 0. Due to this
fact the Controller HCI driver was leaking (i.e. not freeing)
those events, grinding the recv_fiber to a halt.

Issue identified by Szymon Janc.

Change-Id: I3e259b2823717b523ac331f8f787252414fb9290
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
f187ab3b77 Bluetooth: drivers: Fix non-ASCII characters in NBLE code comments
Change-Id: I52377bd00e8890d30128b7cd3b3796abc4d6431d
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
ca1e885914 Bluetooth: drivers: Remove usued variables from H5 driver
Some variables were never used.

Change-Id: Ic6af13ab3292f1859120b9b939da5dfab7813194
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Luiz Augusto von Dentz
5b99294b6c Bluetooth: GATT: Add helper to discover next range
This moves duplicated code that has handling discover rounds into a
helper function.

Change-Id: I0d2d0f64ecee73b83f588949df634f5adda552eb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
19138eb2f4 Bluetooth: samples: Remove redundant CONFIG_ARC_INIT=n
CONFIG_ARC_INIT defaults to 'n' now days so there's no reason to try
to explicitly disable it in the sample config files.

Change-Id: I88df06ba23bdac697f0767384f7b88e3bd9fced9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
a78e8addad Bluetooth: hci-uart: Add a sample configuration file for nRF5x
Add a config file for boards using the Nordic Semiconductor nRF5x
ICs with reasonable defaults in terms of UART configuration and
controller settings.

Change-Id: Iaa5904c96c0f40a2749b7dda0398dd35fa809f24
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
9292a83424 Bluetooth: hci-uart: Don't include nanokernel.h
Include zephyr.h instead which properly includes nano or unified kernel
headers.

Change-Id: I41c848092d022e2b0737ae6b2b53084eaf9bc6a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
167dd07d4c Bluetooth: Expose BLUETOOTH_MAX_CONN for controller-only build
The controller implementation also uses BLUETOOTH_MAX_CONN, so it
needs to be available even when the host hasn't been configured to be
part of the build.

Change-Id: I31ab42a4f0abe21ae613f5408391446eaf72b35f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Luiz Augusto von Dentz
26543fd616 Bluetooth: L2CAP: Delete fragments as they are processed
Once fragments no longer have any data delete them.

Change-Id: I71e4360d5fb56dea061248210159daf542c3dab1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
8b831e0ffe Bluetooth: A2DP: Remove includes from internal header
Those are not needed as convention for internal headers is that
c-file includes required headers in correct order.

Change-Id: Ia5bc0fa056921675e32da4e513d096e1479a38e5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
86912a5e83 Bluetooth: HCI: Remove "EDR" and "HS" marketing terms from macros
Remove "EDR" and "HS" postfixes from the version names, since
those are only relevant from a marketing point of view, and
not at all for HCI compatibility purposes.

Change-Id: Id8b4b010ed8b80dd63898c4baf85062e51b2635a
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Anas Nashif
465de4a1a0 Bluetooth: tests optimize testcase.ini for shell and init
Change-Id: Ia3f09e33684075394bf5d3e91ade53aaf4443a17
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-28 08:09:08 +03:00
Anas Nashif
d6e2de744b Bluetooth: cleanup testcase.ini and adapt to current platforms
Change-Id: If5df39337aee31c0e72dad8c1a38c69e6c1b0a72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-28 08:09:08 +03:00
Carles Cufi
3a670fce6d Bluetooth: hci-uart: Use a fiber to offload TX from ISR
Due to the fact that ISRs run at priority 1, the LE_Rand
command was not being rescheduled after CPU sleep to be
able to fill its buffers. By performing all TX (to controller)
work on a fiber, the RNG ISR is able to run and the command
can be executed synchronously in the fiber context.

Change-Id: I3b658e1cab3f80ae655cc88566639a122a361a08
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Carles Cufi
40b8ea136a Bluetooth: Controller: Set HCI version to 4.2
Report the HCI version supported by the Controller as 4.2,
since it was set as 0 (1.0b) and this confused certain Host
implementations, such as BlueZ.

Change-Id: I809721ee9c2b55e77e6a3ca63688c802a9ffa0ba
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-10-28 08:09:08 +03:00
Szymon Janc
e97deb4093 Bluetooth: RFCOMM: Use helper for accessing nano_sem count
This fix unified kernel build with RFCOMM debugs enabled.

Change-Id: I183924ac66a25793a5a99f3d85a5be0b4c5e6dfe
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
bcea1d4e4b Bluetooth: L2CAP: Use helper for accessing nano_sem count
This fix unified kernel build with L2CAP debugs enabled.

Change-Id: I995db11a7f2bc266866693e2d633f69387069b85
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Johan Hedberg
9d04ff3365 Bluetooth: samples/README: Document hci-usb and hci-uart
Add short descriptions for what the hci-usb and hci-uart applications.

Change-Id: Ie06cfa1678243e97b49e5594a00086cbf3c343be
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
8c118f8673 Bluetooth: L2CAP: Fix build with unified kernel
Use helper for accesing nano_sem count. This fix build error on unified
kernel where nano_sem is wrapped by k_sem.

Change-Id: Iad840e3c635a0fbc3b5eeee2e61479fa3d39ca30
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
15c473e290 Bluetooth: Remove not needed includes
Those were leftovers copied around when new files were added.

Change-Id: I283d59255a302f15fb027764ae9f761ebf646961
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
21243bddb7 Bluetooth: A2DP: Cleanup headers includes
Make sure global headers are included before local.

Change-Id: I5b80dad1ecc75e3e40249da2e5f7fd7f8d7b3e8f
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Szymon Janc
43192b9788 Bluetooth: Include zephyr.h instead of kernel specific headers
zephyr.h includes required kernel header depending on selected
configuration.

Change-Id: I94c6cc2641e0146c79c4f8ed697e9e0d84667746
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
a6f2d703bc Bluetooth: L2CAP: Minor cleanup in conn request
Remove redundant stack var. The status of connection response is set
directly in l2cap_br_conn_req_reply() based on result parameter.

Change-Id: I6f1f5def51a1a027751930b67caf31eed383e4e6
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Arkadiusz Lichwa
6de63cee65 Bluetooth: L2CAP: Minor cleanup in naming
Uses more apropriate semantically value to status field applied to
connection response by default.

Change-Id: Icfd9cc6a25674ef1df49138f3fcc79e58f419759
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-10-28 08:09:08 +03:00
Anas Nashif
f8dcad4a5b sanitycheck: filter out the prebuilt.elf introduced by Makefile cleanup
commit 018b831a36 keeps another elf file in the
outdir which confused the sanitycheck script.

Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 18:30:27 -04:00
Anas Nashif
27043d71e0 tests: move quark_se boot stub to tests
Lets not confuse user with this code, it is clearly not a sample.

Change-Id: I3a0209fb34b2c97383b0f5382f156b80470fdaf7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:53 +00:00
Anas Nashif
b5427473fc samples: add light sensor sample using the grove kit
Change-Id: Idf88aac781b2fd2314694c38dfa20d36fee517f9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:33 +00:00
Anas Nashif
2af8eb17c1 samples: add temperature sensor sample using the grove kit
Change-Id: I94a3648f2a3b0928f38baabcfe4ef47d23a7b9fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
b152246a83 sensors: make grove sensors depend on CONFIG_SENSOR
The grove sensors use the sensor interface, so make them depend
on it just like the other sensors.

Change-Id: I9b62a3fa26f54dd683c65ca154c1af7c7c92772f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:32 +00:00
Anas Nashif
adf8a30b80 samples: move grove lcd to samples/grove
Change-Id: Ibf97ad2a4bd1234960f6da9585eff122e5876f62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00