Commit graph

19237 commits

Author SHA1 Message Date
Anas Nashif
f86452493f Zephyr v1.4.0-rc2
Change-Id: I6c5346551d58991ed9cebc93a04c3b099ddd18b2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-01 19:51:00 -04:00
Kumar Gala
556b66f468 More cleanup whitespace in Kconfig files
Some additional whitespace converted to TABs

Change-Id: I945383f70960ad97e9cbc11ea96b099bcc558404
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-01 22:39:54 +00:00
Anas Nashif
7d76e9619b ext: move tinycrypt to ext/lib
Tinycrypt is maintained at github and thus should be treated as an
external library and hosted under ext/.

Change-Id: I4c4a3bcdacf01d4922919e5ea1f9dec21a19cd37
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-01 14:27:41 -04:00
Bogdan Davidoaia
4b00a69989 sensor: hts221: fix sensor type in Kconfig
The driver for the HTS221 sensor was added with the wrong type stated in
the Kconfig file, as it is a temperature and humidity sensor and not a
magnetometer.

Change-Id: Icc50c9b7ccc491b1c22e13d00607123a45338b11
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-01 14:25:27 +00:00
Chuck Jordan
4c5ab29597 doc: new URL for EM Starter Kit board
Marketing is telling me to switch URLs for the EM Starter Kit
board story.

Change-Id: I342849d1085330eb9e5e88f08374bb5889695702
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-01 14:25:09 +00:00
Chuck Jordan
6c86ed85fe arc: fix stack corruption caused by firq handling
There are a few problems with the code being repaired here.
1. A seti was used to re-enable all interrupts, even though the
thread being switched to may have had certain interrupt priorities masked.
2. saved status32 already has SC bit if thats wanted, so its ok to just
restore status32 as-is w/o needing to and off anything.
3. the code is difficult to write using kflag and seti because as you
restore registers, there aren't any to use. But we can exploit a
trick where we pretend an interrupt has occured by setting a bit in
AUX_IRQ_ACT, and then use RTIE instruction to restore status32
atomically with branching to return address. Something about the way
this code was written was causing stack corruptings and crashes in an
application that uses a high rate of both FIRQ and Regular interrupts.

Change-Id: Ia7166d51f0e750c07832ab115b7151ce37ee0278
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-01 14:25:01 +00:00
Murtaza Alexandru
b3a485147f sensor: add driver for LSM6DS0
Add driver for LSM6DS0 accelerometer, gyroscope and temperature sensor.

Change-Id: Ic04fa8d0bbf935e7f04ed7981554d8095ceb5ccf
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-06-01 11:48:50 +00:00
Bogdan Davidoaia
caa506102e sensor: ak8975: add support for MPU9150
The AK8975 chip can be packaged together with a MPU6050 chip, resulting
in a MPU9150 chip. In this format, the MPU6050 part of the MPU9150 chip
needs to be turned on and pass-through mode enable in order to communicate
with the AK8975 chip.

Datasheet:
	http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-9150-Datasheet.pdf

Register Map:
	http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-9150-Register-Map.pdf

Change-Id: I120dff11c187689e2e6968c812aae2e3e3578bc6
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-01 14:02:20 +03:00
Bogdan Davidoaia
c4c01a92f3 sensor: add driver for AK8975 magnetometer
Add driver for the AK8975 3-axis electonic compass.

Datasheet:
	http://www.akm.com/akm/en/file/datasheet/AK8975.pdf

Change-Id: I427f954396c8991a153e4447d746b855d19cb60d
Origin: Original
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-01 14:02:20 +03:00
Bogdan Davidoaia
01062d97aa sensor: add driver for MPU6050 sensor
Add driver to MPU6050 six-axis motion tracking device. The driver has support
for accelerometer, gyroscope and temperature channels.

Datasheet:
	http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf

Register Map:
	http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf

Change-Id: Id3930fc666195051093fee80c15cf2deb0eaedff
Origin: Original
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-06-01 14:02:13 +03:00
Andrei Emeltchenko
d9033386bf Bluetooth: log: Enable STDOUT_CONSOLE for printf support
The Bluetooth logs use format specifiers available with printf but not
with printk. Selecting STDOUT_CONSOLE enables printf support, which
makes the logs readable again.

Change-Id: I3e86f0bcf31688148a340eba6cdf33e81c64393d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-01 08:21:29 +00:00
Andrei Emeltchenko
d00b9f0cb9 drivers/nble: Check existence of callback before call
Check that callback is defined before call, fixes issue in
on_nble_sm_status_evt calling cancel callback.

Change-Id: Ie2f49ed6e441f4260dacd16120e09f892c1fd528
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-01 08:21:18 +00:00
Luiz Augusto von Dentz
4290cf3b77 Bluetooth: SMP: Make use of nano_delayed_work API
This replaces use of delayed fiber with nano_delayed_work which uses the
system workqueue fiber and stack.

Change-Id: Ie127fc5eb6f38b38df072154a702d4efc34ed9f4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 07:10:42 +00:00
Luiz Augusto von Dentz
f6dd1e4144 Bluetooth: Add support for using SYS_LOG
This add CONFIG_BLUETOOTH_DEBUG_LOG which depends on SYS_LOG since the
later can actually use either CONFIG_PRINTK or CONFIG_STDOUT_CONSOLE.

Change-Id: Ib2974d1331f6c91d119a218ec95e8bf01069377b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 05:04:10 +00:00
Sergio Rodriguez
ab833c74c5 i2c: quark_se ss: Use locking mechanism to guard critical regions.
This will allow the driver to be safe from fibers and task

Jira: ZEP-411

Change-Id: I714f22c8df7002c45bed981c493e11af91c70d93
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-06-01 00:42:11 +00:00
Luiz Augusto von Dentz
967f8fb602 nanokernel: Add callback to _nano_timeout once again
It is now safe to introduce the callback since nano_timer_init now
calls _nano_timeout_init which does takes care of initializing all
the fields properly.

Change-Id: I5735eeebef233a0a541ec8b2a354b65da98082fc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 00:35:05 +00:00
Luiz Augusto von Dentz
4afb4e4150 nano_timer: Make nano_timer_init call _nano_timeout_init
With the introduction of _nano_timeout_init it prefered to call it
to initialize the _nano_timeout fields properly.

Change-Id: I83e9c63f9bb2903c508264d1199d2c687c330ec8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 00:34:55 +00:00
Sergio Rodriguez
10e33ff779 i2c: Bug fix for the semaphore locking mechanism for i2c
The locking and synch mechanisms were configured after the interrupts
for the I2C controller are enabled, now the configuration is done before
the enabling of the interrupts.
Jira: ZEP-419
Change-Id: Ia1b0e790b9f5f8e7560cc3556b7a0f394048d171
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-31 22:54:55 +00:00
Sergio Rodriguez
7c00c4d3be spi:quark_se ss: Use locking mechanism to guard critical regions.
This will allow the driver to be fiber and task safe

Jira: ZEP-410

Change-Id: I61d3d9e4128bae781f1c86c07af79eb6e43ebeda
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-05-31 22:54:40 +00:00
Luiz Augusto von Dentz
d6f039ed79 nanokernel: extract _nano_timeout_init from _nano_timeout_tcs_init
This will allow initializing a nano timeout that is not associated with
a thread.

Change-Id: Ic71175b0059396b19a0e3616f4fab570071c3d48
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:53:17 +00:00
Luiz Augusto von Dentz
8b1afeaaa3 tests: Add tests for delayed workqueue
Change-Id: If62f44a989012047008c0d782aef2aa7b6016190
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:52:52 +00:00
Luiz Augusto von Dentz
b559c1bca2 nano_work: Add delayed version
This adds a delayed version of nano_work API which is useful when
handling timeouts since the same stack/workqueue can be shared.

Change-Id: Iac43796fe96deb0a9c8976c91a65104b57779b00
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:52:51 +00:00
Javier B Perez
b861982fc8 maintainer: update doc file path to accept all under doc/ dir
If we use doc/* maintainer will only take care of files inside
doc/__. Instead if we use plain doc/ maintainer will be responsible
for all the content inside doc directory.

Change-Id: I1b69667a42231d3de826413eb5aa281b7f68d61a
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-05-31 15:17:27 -05:00
Anas Nashif
627918822c checkpatch: decrease max line number to 80
Change-Id: I6bb83f877e10e5bd3f47eed264c8532081426bca
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-31 19:09:14 +00:00
Anas Nashif
89205da16e checkpatch: catch changes to MAINTAINERS file
Change-Id: Iceb85f6e9fb3c66f89383f4d159d3752639356b1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-31 19:09:14 +00:00
Flavio Santes
65ccf8330f samples/net/mqtt: Fix mqtt_connect function
Remove erroneous initialization of 'data' via memset.
Set keep alive interval to 0.

Change-Id: I5da4649985efd39b37bbbdc6ae21a856f9e40b13
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-31 11:22:01 -05:00
Szymon Janc
d1d0ee7b2d Bluetooth: Allow to call enable function only once
Currently enable procedure can be called only once regardles if it
failed or succeeded.

Change-Id: I3869e97442720860baba7bb1b7610738ca95561a
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-31 11:37:12 +00:00
Szymon Janc
d2fa54d4a6 drivers/nble: Use flags for state tracking
Using atomic flags instead of bool allows adding new states easily
without aditional memory footprint.

Change-Id: I0289a49af8353dc832a33e16ebdd6651c3913fe3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-31 11:04:41 +00:00
Andrei Emeltchenko
47d104530c drivers/nble: Call right function in bt_conn_auth_cancel()
Change-Id: I9e8ced163b95acbcb1835ed4b0de4fd110a2bd54
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 11:04:03 +00:00
Andrei Emeltchenko
c42ea24886 drivers/nble: Refactor on_nble_sm_status_evt()
Remove NBLE_GAP_SM_EVT_START_PAIRING handling since this is handled
now in the special pairing event and defer negative status handling to
the actual event code processing.

Change-Id: I232d9e5ecd09b2600df3ff04128dfb7f71a2eae2
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 11:03:40 +00:00
Andrei Emeltchenko
4f696dd779 Bluetooth/shell: Correct confirm shell commands spelling
Change-Id: I832d8898a0e49b2d7b07a9f81193f52f31d45c7d
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 11:03:25 +00:00
Andrei Emeltchenko
4a2afe4ade drivers/nble: Implement pairing confirm callback
Implement bt_conn_auth_pairing_confirm() callback.

Change-Id: I53f7fef05833e204e75aeb644efae8db10553e72
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 11:03:10 +00:00
Andrei Emeltchenko
0324f39313 drivers/nble: Implement passkey entry
Implement bt_smp_auth_passkey_entry() and bt_conn_auth_passkey_entry()
functions to be used by apps and tester.

Change-Id: I600284334c67840dd0c17991596ad31986bf0afd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 09:49:34 +00:00
Andrei Emeltchenko
ed044a7279 drivers/nble: Sync smp code for firmware compatibility
This moves SMP related code to smp.c making code similar to the tree
of firmware developers.

Change-Id: I5b43dcbe40a721e11b64cbdd4203406e721f40cd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-31 09:39:25 +00:00
Ravi kumar Veeramally
803de8d14e net: Fix return value from uip_udp_packet_sendto
udp_socket_sendto returns always datalen irrespective of
uip_udp_packet_sendto return value.

Change-Id: Ib1c5a25ae89ddaa0826d35d4fd53f9c2ccea7b93
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-05-31 08:06:37 +00:00
Flavio Santes
0224e3577e samples/net/mqtt: Add a MQTT interactive shell
Add a MQTT interactive shell that can connect, disconnect, subscribe,
publish, read published messages and ping to the MQTT gateway.

Origin: Original

Jira: ZEP-364
Change-Id: Ie85e7b8b9290cb8e80548886aea74a8427b2323b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 20:23:53 -05:00
Flavio Santes
4a320be8a2 samples/net/mqtt: Reduce tx/rx buffer size and update mqtt_publish_read
Set CONFIG_IP_BUF_RX_SIZE and CONFIG_IP_BUF_TX_SIZE to 4.
Modify mqtt_publish_read to retrieve topic name and message as strings.
Change printf for printk.

Change-Id: I6746846cb3359096d87dfbb3134d6a3a95bf087e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 17:26:02 -05:00
Flavio Santes
2df4a0f9e2 samples/net/mqtt: Update README file and code cleanup
Add instructions to download Paho's MQTT Library.
Simplify if statement.

Change-Id: Iba500c47a56896f9c9b726751933443a5318ced7
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-30 10:11:38 -05:00
Szymon Janc
7cd474b3d7 Bluetooth: shell: Fix help message for LE address
LE address can be either public or random.

Change-Id: I5578732bd9929da22ef83f78fbe7ad608847a0d7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 13:11:25 +00:00
Szymon Janc
743437bc7b Bluetooth: shell: Add support for setting local ID address
This allows to set custom ID address from shell app.

Change-Id: I293800f116a7e56e183720a9b908ccb0e9622c12
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 13:11:14 +00:00
Szymon Janc
31912bcb23 Bluetooth: Constify bt_register_starage parameters
There is no need for struct bt_storage being modified by stack.

Change-Id: I732cf94983a29de40d692e802d6a71b8986708df
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 12:57:24 +00:00
Zhicheng Wei
bd3043dc00 pci: fix typo in code example
Change-Id: I2d35c2110e387991f6daac5718f50ec66fc87a36
Signed-off-by: Zhicheng Wei <zhicheng@opensourceforge.net>
2016-05-30 12:54:20 +00:00
Carles Cufi
dbb596d2c7 doc: nRF52 PCA10040 rst markup fixes
Correct the indentation of numbered lists to
appear correctly once render.

Change-Id: Ie1b92a7c5d2517e4f36626858404458c3b461be9
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-30 12:43:16 +00:00
Grzegorz Kolodziejczyk
d1cad8ecce Bluetooth: Fix long writes handling
This patch fixes long writes handling. Attribute length error and
invalid offset error for prepare write should be sent in a response
to execute write request.

Change-Id: I9b4cbe0df198df9d685dbd2b328009290ebdc567
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-05-30 11:12:23 +00:00
Luiz Augusto von Dentz
9fed4ce48a Bluetooth: Add missing flags to beacon sample
The flag BT_LE_AD_NO_BREDR shall be set which makes BT_DATA_FLAGS
mandatory.

Change-Id: Id933a4d73bc9fdcdc53c197041bb488d45ba149a
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-30 09:24:04 +00:00
Andrei Emeltchenko
a195351151 drivers/nble: Update RPC to version 0527
Update RPC to the newest RPC introducing some security improvements in
the firmware.

Change-Id: If031bb13927d63e029fcc6da34051257d13632a5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-30 09:07:50 +00:00
Andrei Emeltchenko
979e10de6f drivers/nble: Fix NULL dereferencing
Fixes dereferencing NULL calling not defined function. Fixes PTS test
TC_GAW_CL_BV_01_C which was failing with the trace:

...
bt: on_nble_gattc_write_rsp (0xa80099e4): conn 0xa8008f60 status 0
***** CPU exception 6
Current thread ID = 0xa80099e4
Faulting segment:address = 0x00000008:0x40000000
eax: 0xa8008f60, ebx: 0xa8008f60, ecx: 0x00000000, edx: 0x00000000
esi: 0xa8009f88, edi: 0x00000000, ebp: 0a8009f80, esp: 0xa8009f70
eflags: 0x00010247
Fatal fiber error! Aborting fiber.
...

Change-Id: Ia76c2ad816e6427b353ab245855a1959c23c5feb
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-05-30 08:59:10 +00:00
Szymon Janc
515ec20a06 Bluetooth: SMP: Fix not waiting for remote DHCheck
When doing LE SC pairing with Passkey Confirmation slave must wait
for remote DHCheck before doing comparison. This fix issue with
pairing as slave when passkey was first confirmed locally.

Change-Id: Iba780836341a944997adde24285b2e650b31afa1
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 09:37:06 +02:00
Szymon Janc
d7ae97de69 Bluetooth: Fix sending DHKey event if invalid key was provided
bt_recv should be used to send event back to stack.

Change-Id: I092e2480b3f0e5c40c0751c30be46d0310012bae
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-05-30 09:37:06 +02:00
Anas Nashif
b05e2dea29 Zephyr v1.4.0-rc1
Change-Id: I3883cd6dd8c80f3b5b521df98edf4e0c52992983
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-29 23:24:24 -04:00