Commit graph

42249 commits

Author SHA1 Message Date
Andrew Boie
7a87f9f500 expr_parser: support ':' operator
Similar to '==' but compiles the RHS into a regular expression
and attempts to match whatever is in the environment against it.

Change-Id: I7a03452ef88d067b62661d14dc6f42273de436fa
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
Andrew Boie
99c0f64b34 expr_parser: fix concurrent use issues
Change-Id: Ic9ef5d42f4348ada5c418a36118660e79a1a689b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
Andrew Boie
5aaf5f1c6f expr_parser: support single-quoted strings
Change-Id: I00af87ac3ebd1d63ceba0bb2c9dcf17f56aa8177
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02 23:10:07 +00:00
ktseng
837c7629bb maintainer: add sections for power management, shim drivers, and
flash driver

Change-Id: I85af1365d19b2a880864b6732c7733d6490b4a69
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-06-02 23:09:31 +00:00
Anas Nashif
1cb62d0372 i2c: qmsi: use I2C_SPEED_FAST_PLUS from API
Do not use the QMSI specfic define, use the one define in the
i2c API instead.

Change-Id: I979673e35060d041cb97f4de178069e2bdfd2c7b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-02 13:46:44 -04:00
Anas Nashif
5b202557d3 adc: qmsi: remove obsolete usage of QM_RC_OK
Change-Id: Ia34cc9d8b8b37a9157499be0843c5a42fec9a380
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-02 12:21:10 -04:00
Szymon Janc
05bdba7768 Bluetooth: Fix clearing BT_DEV_ENABLE on HCI reset complete
BT_DEV_ENABLE flag value must be preserved after HCI reset is complete
to not allow calling bt_enable more then once.

Change-Id: I77bf6111d4fc2a209e0c5a56717decba156068a6
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-02 13:37:25 +00:00
Szymon Janc
07fb2e106b console: shell: Reduce stack usage of tab completion
Print commands names when matched instead of first creating
completion string in buffer. Common part of commands names
can only be reduced when matching further commands so only
first match needs to be kept for altering command line.

Change-Id: I5a9d2eb171ef4d31da9cbe6e93b577457b13c5a2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-06-02 13:28:15 +00:00
Chuck Jordan
789c33e31b board: em_starterkit doesn't have FLASH_SCRIPT yet
I see in the TOP makefile that if FLASH_SCRIPT is undefined,
it outputs the message "Flashing not supported with this board".
This behavior is wanted currently as this board does not
have a memory mapped FLASH device. It has a SPI-FLASH and
there are different instructions for putting an image on to the board.

Change-Id: I07dcdd9a7fd8346b846ee0fe1312d22f9ffaa13e
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-06-02 12:37:13 +00:00
Johan Hedberg
e8620aaada Bluetooth: Take advantage of net_buf_get_timeout()
Use the more explicit net_buf_get_timeout() call where it makes sense
(e.g. where we always want to wait or never want to wait).

Change-Id: Id1eabe0ad2f9fa79f7be39e51fefa5161f9cc550
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-02 10:32:29 +00:00
Johan Hedberg
6e4d2a9e0e net: Add net_buf_get_timeout() API
With this API it's possible for the caller to force specific behavior
when it comes to waiting (or not waiting) on the FIFO.

Change-Id: Ib66e2f767c26c82abf1ba3b80bd15aec2383542e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-06-02 10:32:20 +00:00
Andrei Emeltchenko
2b456dd120 drivers/nble: Implement on_nble_sm_security_request_evt()
Implement handling SM Security Requests. Fixes among others following
Bluetooth PTS test cases:

...
1/6   GATT   TC_GAR_CL_BI_05_C   PASS
2/6   GATT   TC_GAR_CL_BI_22_C   PASS
3/6   GATT   TC_GAR_CL_BI_27_C   PASS
4/6   GATT   TC_GAW_CL_BI_06_C   PASS
5/6   GATT   TC_GAW_CL_BI_24_C   PASS
...

Change-Id: Id35004a134bb9898e3b0dd51309f1762676ca579
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-06-02 12:08:54 +03:00
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