Commit graph

42249 commits

Author SHA1 Message Date
Johan Hedberg
9632d46ae7 drivers/nble: Clean up & simplify IPC UART encoding
We can take advantage of the net_buf headroom. At the same time move
the necessary definition straight into uart.c and remove any unused
definitions.

Change-Id: I932bba2cfb11808aabce7bad09e41f94d073bb5b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-11 12:44:41 +00:00
Rodrigo Caballero
465cd01d9f doc: API edits for microkernel semaphore.h
Review and edit API notes for punctuation and to make explanations about
conditional routines the same throughout microkernel APIs.

Made consistent use of @retval to document return values.

Used imperative verbs for all @brief descriptions.

Change-Id: I2da0ea869151f3bdd5846f86d31dfd899e1ca1fc
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 12:16:23 +00:00
Jukka Rissanen
4006f47627 net: Allow user to tweak 802.15.4 fibers stack sizes from Kconfig
User is able to tweak the stack sizes of 802.15.4 RX and TX fibers.
These fibers are responsible for receival and transmission of
6LoWPAN 802.15.4 network packets.

Change-Id: I28dea287c1d939333fef0c1ac4eb890295c7bd9e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-11 11:54:07 +00:00
Jukka Rissanen
5ae183a403 net: Allow user to tweak IP fibers stack sizes from Kconfig
User is able to tweak the stack sizes of RX, TX and timer
fibers. These fibers are responsible for receival, transmission
and re-transmission of IP network packets.

Change-Id: I43238180e628ed47f431ece0bc6dfcdfb035325f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-11 11:54:07 +00:00
Johan Hedberg
58ba5e8633 drivers/nble: Convert RPC serialization code to use net_buf
Using net_buf helps us remove a lot of the pointer & data length
book-keeping variables and in general makes the code more readable.

Change-Id: Iec870a3bacbb63b55329ef5214b0ee0a757f5b1e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-11 11:50:28 +00:00
Luiz Augusto von Dentz
6514cda4b2 drivers/nble: Enable debug only if CONFIG_BLUETOOTH_DEBUG_GATT is defined
This will prevent debug output to be printed if in case
CONFIG_BLUETOOTH_DEBUG_GATT is not defined.

Change-Id: I93be7ccbcf0a8eae5ecb54b174d6ed2d892673dd
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-11 11:49:50 +00:00
Szymon Janc
60e781b6f6 Bluetooth: Kconfig: Remove not needed help quotation marks
There is no need to keep help message in quatation marks as those
will be shown in menuconfig.

Change-Id: If47e7bb029cfc17c7def971c563178ba38120731
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-11 11:20:41 +00:00
Luiz Augusto von Dentz
badcb1dc95 drivers/nble: Add BLUETOOTH_DEBUG_GATT to Kconfig
This option can be used to enable debug for GATT using the same option
as with HCI driver.

Change-Id: Ie2f2692422bc1e1f2a5504c60d90961261b53d17
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-11 11:17:16 +00:00
Szymon Janc
4318fc0e5b Bluetooth: Kconfig: Add TinyCrypt ECC config option
This enables use of ECC from TinyCrypt. Since ECC is heavy this option
is separated from general use of TinyCrypt in SMP code.

Change-Id: Ia550e4a5f89240c8e15d2b5acccc21993b44b471
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-11 10:56:40 +00:00
Johan Hedberg
754248aedc net: buf: Add convenience API for adding 8-bit integers
There are many situations when encoding data when we need to insert
single bytes to the buffer. With this helper the encoding code stays a
bit more readable.

Change-Id: Ibc0ce43af5ae25a1baa0f1adbc5816ae7c04e3bb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-11 11:14:20 +02:00
Andrei Emeltchenko
028d7020c4 drivers/nble: Update data types following RPC sync
Change-Id: I04c0976720675f2b73023bdada15d4c54f81f348
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-11 10:17:36 +02:00
Peter Mitsis
43579b39d2 bluetooth doc: Fix typos in uuid documentation
Change-Id: Id5c91e2a257a79fc18ebbe459b0261daaa156672
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-11 07:55:06 +00:00
Peter Mitsis
d663e873f5 bluetooth doc: Fix unsupported xml/html tag warnings
Uses the correct doxygen formatting tags to identify variables.

Change-Id: Ia46d4e008eb7790383682ac33bd3d6dbc2a66a9d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-11 06:31:52 +00:00
Anas Nashif
a7c4aa2e8a sanitychecks: add new keyword 'kernel' to testcase.ini
Specify the kernel being tested instead of relying on parsing
Makefile for KERNEL_TYPE.

This is needed for testcases that build for multiple kernels.

Change-Id: Ic4df2fa66eee4cd498955aee2b0da80a99d35e30
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 02:23:26 +00:00
Anas Nashif
d93cb67109 scan for testcases in root to cover samples and tests
We have test cases in both samples and tests directories,
so cover both by scannining the root directory.

Change-Id: I5258d11b23ced2cc4fc88af4d40269310442dc9f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 02:23:00 +00:00
L.S. Cook
4d5b1aced4 doc: Edit API documentation on microkernel task.h
Reviewed for consistency, punctuation, parallelism among all
the microkernel API docs.

Change-Id: Ia40761694081f40d3ee9821058a6691cba98fc08
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:46:42 +00:00
L.S. Cook
96283e3a81 doc: Edit API documentation on microkernel memory_pool.h
Review and update for parallelism and consistency in formatting,
punctuation, and phrasing among all the microkernel APIs.

Change-Id: I4677cfafd8dffa75b5b19db3d16f5b90ad41b70f
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:46:37 +00:00
L.S. Cook
8e6fc98203 doc: Edit API documentation on microkernel task_irq.h
Reviewed for clarity and consistency in punctuation and style among
all the microkernel APIs.

Change-Id: I61548a906b4e89f2fbed214dbf7cda9fadac217d
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:46:17 +00:00
L.S. Cook
a56fae8e80 doc: Edit API documentation on microkernel pipe.h
Editing for consistency in punctuation and formatting among
the microkernel APIs.

Change-Id: I69b0541fbb45cdc0eb9368cf386d51c2a03a85f9
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:46:17 +00:00
Aceves
806d2a767e doc: Edit microkernel mailbox
Edit the API for grammar, punctuation, clarity and doxygen format.

Change-Id: Iddf0a4f123658ece8313ab401718c77fcc715acd
Signed-off-by: Aceves <gerardo.aceves@intel.com>
2016-02-11 01:21:51 +00:00
Aceves
9dea8dbde9 doc: Edit the microkernel FIFO
Edit the API for grammar, punctuation, clarity and doxygen format.

Change-Id: I122f1993943f58d7262b239b887103f50ef8ddc7
Signed-off-by: Aceves <gerardo.aceves@intel.com>
2016-02-11 01:21:19 +00:00
Aceves
85ec5ff7cc doc: Edit the heading markup
Edited heading markup for consistancy.

Change-Id: Ic91cea28427be92e82f1318821a6eead78467c52
Signed-off-by: Aceves <gerardo.aceves@intel.com>
2016-02-11 01:19:48 +00:00
L.S. Cook
3075a44e00 doc: Edit API documentation on microkernel ticks.h
Punctuation and style consistent among the microkernel APIs; made
sure imperative verb on @brief descriptions.

Change-Id: I0f270fdb9db4eeb45f65e483b3cafdcbc5c09418
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:15:43 +00:00
L.S. Cook
d385e9abff doc: Edit API documentation on microkernel mutex.h
Punctuation and style consistent among the microkernel APIs; made
sure imperative on @brief descriptions.

Change-Id: I79f107dccedc8e3468640b3c9066f838687d35c8
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:15:43 +00:00
L.S. Cook
f6d2c8cb5b doc: Migrating API edit on microkernel memory_map.h
Edited API comments on memory_map.h to be consistent throughout
microkernel APIs and corrected spacing on descriptions

Change-Id: I14dae30decccf7385e9fea6d841c3e54fb1a9bb3
Signed-off-by: L.S. Cook <leonax.cook@intel.com>
2016-02-11 01:15:43 +00:00
Peter Mitsis
32151afbda arm build: Select correct library version
The build system now pulls in the correct intrinsics libraries
when building for Cortex-M CPUs.

Change-Id: I55ed249cdeb04de8843ad4cdc0099e7031e368b0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-11 01:13:49 +00:00
Dan Kalowsky
21a99e639d nanokernel : clean up comments
Moving comments back to the 70 character limit.  Also moving some of the
comments up to be included in the doxygen headers instead of inline.

Change-Id: I56a6015e5fd6da81e9a06701217e62e899b6aa62
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-11 01:10:15 +00:00
Rodrigo Caballero
5903f235fc doc: Edit the I2C driver APIs
Edit public API details for clarity, grammar, punctuation found
on file i2c.h

Made consistent use of @retval to document return values.

Used imperative verbs for all @brief descriptions.

Change-Id: I87b262f6ab91a83f429b7f7d9152914b92e11c8a
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:09:00 +00:00
Rodrigo Caballero
a7738f49c4 doc: Edit the PWM driver APIs
Edit public API details for clarity, grammar, punctuation found
on file pwm.h

Made consistent use of @retval to document return values.

Used imperative verbs for all @brief descriptions.

Change-Id: I5a0f6290361e499ceb911473338358128f85e25f
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:08:41 +00:00
Rodrigo Caballero
3010de9850 doc: Edit the IPM driver APIs
Edit public API details for clarity, grammar, punctuation found
on file ipm.h

Made consistent use of @retval to document return values.

Used imperative verbs for all @brief descriptions.

Change-Id: Ie5516fcb18648a99c58bcfef7888286dead7cff4
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:08:24 +00:00
Rodrigo Caballero
18c24a9ec2 doc: Edit the Pinmux driver APIs
Edit public API details for clarity, grammar, punctuation found
on file pinmux.h

Change-Id: Ib75e5c3bff84709e8f3f830dd71dde00bdef08a2
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:06:53 +00:00
Rodrigo Caballero
7e68a8b934 doc: Edit the GPIO driver APIs
Edit public API details for clarity, grammar, punctuation found
on file gpio.h

Used imperative verbs for all @brief descriptions.

Change-Id: I5c9b7ac39d2b691d98f72b66c67f525ad0409207
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:06:39 +00:00
Rodrigo Caballero
0daf7e4968 doc: Edit the SPI driver APIs
Edit public API details for clarity, grammar, punctuation found
on file spi.h

Made consistent use of @retval to document return values.

Used imperative verbs for all @brief descriptions.

Change-Id: Ie53eeeb79d399e8474fe7341a396f5437c2999dc
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:05:46 +00:00
Rodrigo Caballero
10bea3dec8 doc: Include the I/O APIs in the documentation.
Includes the I/O drivers' interfaces in the ReST documentation.

Change-Id: I9ef70c4b0561c102b5c9425b4e41b5c813bf51b6
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:04:38 +00:00
Rodrigo Caballero
9a1acd715a doc: Edit the code-block ReST documentation.
Change-Id: I4e38d9ed3cfb0aa50d559a94641c10175142f659
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
2016-02-11 01:03:57 +00:00
Andrei Emeltchenko
483f015359 drivers/nble: Print local Bluetooth address
Add printing local bdaddr to help with discovery.

...
on_ble_gap_read_bda_rsp (0xa80089a4): Local bdaddr: C3:40:54:C7:DE:B4
(random)
...

Change-Id: I19f8000b1029fdc839303203d6bac91ee76231ed
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-10 19:13:02 -05:00
Szymon Janc
068fe1136e Bluetooth: SMP: Add support for TinyCrypt ECC
This allows to use ECC implementation from TinyCrypt instead of
controller based ECC.

Change-Id: I09bdff78899c1ac5cd1d10243d4c00c4d0a75d83
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-10 19:13:01 -05:00
Andrei Emeltchenko
86ae7dcb0c drivers/nble: Read local Bluetooth Address
Read and store local bdaddr, serialize command sequence.

Change-Id: Iea6a0e9d7dab3bbba04c26f47f07bc5d2527e9d7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-10 19:13:01 -05:00
Szymon Janc
708126cd30 Bluetooth: Use correct CONFIG option for TinyCrypt ECC define
The option is named CONFIG_TINYCRYPT_ECC_DH.

Change-Id: Ice30857d368582f5bc5d2f47e8ce6b1a89e29128
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-10 19:13:01 -05:00
Andrei Emeltchenko
5e3930cf12 drivers/nble: Use rsp instead of par
Using rsp instead of par makes code more intuitive.

Change-Id: Ib6594e78f4c6d0088e66e9023a696ea42a2e1f4f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-10 19:13:01 -05:00
Jukka Rissanen
4d3cb02446 net: Increase the 802.15.4 TX stack to 4096 bytes
If application needs to send large packets, the 802.15.4
fragmentation code needs to store the fragments somewhere.
Currently this somewhere is stack which means that we
need to increase the stack size quite a lot.

Change-Id: I9b08563e77c021e5ac103e637e331d7b977563cc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-10 19:13:01 -05:00
Szymon Janc
6de50c5aa6 Bluetooth: Store LE SC Public Key in SMP code
There is no need to keep this in bt_dev structure as this is not
used outside of SMP code.

Change-Id: I24a1d9daffb4d382bf1ed07a5645e4cbdafa3c5e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-10 19:13:01 -05:00
Johan Hedberg
31b9a82f65 Bluetooth: samples/peripheral_hr: Add "Zephyr" to device name
Change-Id: I6ff63676db9d74932a4eef648bf5284b9229d4f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-10 19:13:01 -05:00
Szymon Janc
c762215b79 Bluetooth: Remove CONFIG_TEST_RANDOM_GENERATOR from sample apps
This option is not needed as none of sample uses sys_rand32_get.

Change-Id: I00620a2fa7ea926d09e4e8f86cbf8ca7080478b3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-02-10 19:13:01 -05:00
Luiz Augusto von Dentz
36522ee71b Bluetooth: peripheral: Make heart rate simulation more predictable
sys_rand32_get appears to get stuck with same number for a while so
instead just increment the heart rate by 1 until 160 and then return it
back to 90.

Change-Id: I2aea870c68539271a1bb6190a958a7e2d1914dc3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-10 19:13:01 -05:00
Jukka Rissanen
971af2b249 cc2520: packetbuf attributes were set using wrong pointer
The buf pointer in cc2520_read() points to memory that will
hold the received data. It must not be used to set RSSI and
link quality values. Very difficult to find memory corruption
was seen as we were overwriting memory in other part of the
system. The fix was to set the RSSI and link quality variables
in read_packet() where the buf pointer points to proper memory.

Change-Id: I49bfe37f4c7ccc0f582f3aecdf73d5b3ea6bb4e5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-10 19:13:01 -05:00
Andrei Emeltchenko
ecfc0d12bf drivers/nble: Clean NBLE UART driver
Remove not used code and decrease number of log messages

Change-Id: I3a41fcc15d7f7b7e8802a13f6eb871794437a87c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-10 19:13:01 -05:00
Johan Hedberg
362579cc74 Bluetooth: samples/peripheral_hr: Pass explicit connection to bt_gatt_notify
Change-Id: Ie854ddc3a20ae38df0501ffaa4026dd37c7ae7d8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-10 19:13:01 -05:00
Johan Hedberg
7dc5596de7 drivers/nble: Pass correct handle in bt_gatt_notify
Change-Id: I90d85e681e4274722ed94dce839287e5868a93af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-10 19:13:01 -05:00
Andrei Emeltchenko
7d91d3331f drivers/nble: Add debug for SM config response
Change-Id: I96b124cdf1808e1c948dd8a6511847511eacfbd2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-10 19:13:01 -05:00