Commit graph

41120 commits

Author SHA1 Message Date
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
Anas Nashif
713b29f769 doc: add 1.3.0 to documentation list
Change-Id: I496b48fffda100bf577680e2abad3b030746e0b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-30 00:19:46 +00:00
Milind Deore
7254f1d168 samples: gpio: lcd: sample app for HD44780 LCD controller
Display text strings on parallel interfacing HD44780 based
    generic LCD controller using GPIO pins to interface with
    Arduino Due(SAM3). HD44780 is a popular controller and an
    example can help using gpio pins in parallel with it. I
    have tested it on JHD20x4 LCD panel for 4Bits & 8Bits
    configuration. The code has been made generic so that user
    can modify quite a few options.

    Datasheets:
        http://lcd-linux.sourceforge.net/pdfdocs/hd44780.pdf

Signed-off-by: Milind Deore <tomdeore@gmail.com>
Change-Id: If2809222466b462fa2f4c42b14a514828530f082
2016-05-29 22:28:17 +00:00
Bogdan Davidoaia
34f63de901 sensor: add driver for HTS221 sensor
Add driver for HTS221 temeprature and relative humidity sensor.

Datasheet:
	http://www.st.com/resource/en/datasheet/hts221.pdf

Interpreting humidity and temperature readings document:
	http://www.st.com/resource/en/technical_note/dm00208001.pdf

Change-Id: I1fee9d8372ad71b22bc85a60939c82f81569e135
Origin: Original
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-05-29 22:25:19 +00:00
Bogdan Davidoaia
a2605e50d7 sensor: add driver for LIS3MDL magnetometer
Add driver for the LIS3MDL ultra-low-power high-performance three-axis
magnetic sensor.

Datasheet:
	http://www.st.com/resource/en/datasheet/lis3mdl.pdf

Application note:
	http://www.st.com/resource/en/application_note/dm00136626.pdf

Change-Id: Id2d65e7525bef6c4fe50f86169a80f84197f8983
Origin: Original
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-05-29 22:25:03 +00:00
Flavio Santes
f194272c41 samples/net/mqtt: MQTT publisher and subscriber
This sample shows how to integrate Paho's MQTT Packet Library to create
a MQTT publisher and subscriber application with Zephyr.

Change-Id: I1cb4124386752eef6187a56ccc9f6fd7fe7175a3
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-05-29 22:24:26 +00:00
Chuck Jordan
5f14d8fb01 arc: improved saving of lp_<count,start,end> using GPRs
Since firq utilizes a 2nd register bank, and since all of those
many GPRs can be used, the strategy here is to save extra registers,
such as lp_count, lp_start, lp_end into callee saved registers.
These registers are safe to use because the C-ABI followed by the
compiler will cause these to be spilled to the stack if a C function
wants to use them. By selecting upper GPRs, r23-r25, it is very unlikely
the compiler will spill them. This improvement, therefore, can avoid a
d-cache miss since we are avoding memory altogether when saving these.
The struct firq_regs is no longer needed.

Change-Id: I7c0d061908a90376da7a0101b62e804647a20443
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-05-29 22:23:13 +00:00
Anas Nashif
4262850059 doc: arduino_due: fixed alignment of code sections
Change-Id: Ia7eec225f00ecbcde3c77509d90bba06865b7720
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-29 22:20:59 +00:00
Carles Cufi
ddcc350a8b nrf52: Auto generate Intel Hex kernel image
Generate kernel image in Intel Hex format when building for the nRF52.
Remove the additional step from the board doc file.

Change-Id: I619496f64037c2a0ac459ae05e549e01458e0f71
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-29 03:27:27 -07:00
Anas Nashif
d8933d6c0a arduino due: move pinmux code to board definition
Change-Id: Id52ce660c059ebf47b2f989014faba715ed93c32
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:45:43 -04:00
Anas Nashif
ffdd2e64dc pinmux: fix naming inconsistency
Jira: ZEP-288
Change-Id: Ie9bfd3ac95305a35c96453448d13d6b4cd6c0f0b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:45:43 -04:00
Anas Nashif
babe25e8fc galileo: merge pinmux code into one file
Change-Id: I8f2931f7e6a58813ec5784c6015baa51ed0c6cc8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:45:39 -04:00
Anas Nashif
de4aa2af13 galileo: Remove pinmux kconfigs for the board and reuse existing
Do not redefine the the pinmux configuration for the board, just use
the data directly. No other board will be using those, just the galileo.

Change-Id: If774bc5c4335021ae58a682224f092db23bc9f1b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:40:51 -04:00
Anas Nashif
14e0aa396f pinmux: move galileo pinmuxing to board/galileo
Change-Id: I46da8ee9d9ec807c5a797ae3311519353d54e6c6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:40:48 -04:00
Anas Nashif
0ae2e895d2 remove custom pinmux for quark and use qmsi
Change-Id: I60757c1299df08bd9307d1602204eadce8121d60
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:22:31 -04:00
Anas Nashif
2055b06e4e quark: move pinmux files to board/
Move pinmux defintions under board/<board> and have all board
configuration in one single place.

Change-Id: I055b024384fae2938881b1c57d8ce7426e732e92
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-28 10:22:31 -04:00
Carles Cufi
7101782900 doc: Add documentation for the nRF52 DK board (PCA10040)
Add documentation for the Nordic Semiconductor nRF52 DK board.

JIRA: ZEP-377
Change-Id: I5ade880c4230dd7956792a0eeb429aa00df325cb
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2016-05-28 12:18:36 +00:00
Anas Nashif
329a24f705 doc: add EM starter kit to list of supported boards
Change-Id: Iac02ee7650e86a9d23ca82acbeef8c179e150c83
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-27 22:37:20 +00:00