Commit graph

19237 commits

Author SHA1 Message Date
Andrei Emeltchenko
4cccc24391 usb: Add Bluetooth class codes definitions
Change-Id: Idc60324bcf9ee3e9a3ce9a24b71cf5ae5b339792
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-08-10 15:27:35 +00:00
Jaakko Hannikainen
f77191976a net: contiki: Fix timer callback condition
etimer_expired will return true only once. This means periodic timers in
the netstack won't get to run since etimer_process calls etimer_expired
for all timers in the stack.

Jira: ZEP-475

Change-Id: I28da638789b0604f9dd0a0598a7fa590e6b0a746
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
2016-08-10 15:25:59 +00:00
Ravi kumar Veeramally
5cabc0e048 net: samples: Fix RFC3849 address config option.
NET_TESTING_USE_RFC3849_ADDRESSES not defined as a Kconfig option.
Enable this in Makefile like this
ccflags-y +=-DNET_TESTING_USE_RFC3849_ADDRESSES=1 incase if you need
it.

Change-Id: I96b05d069cf5baa56cc27489b3c38b84412eec97
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2016-08-10 15:14:44 +00:00
Baohong Liu
f8af24c107 drivers: spi: Update comment for spi config parameter
Update the comment for spi frequency. The QMSI shim driver
only accepts clock divider.

Jira: ZEP-461

Change-Id: I4d89a3810b002d594b0c10bf6d33544b7549191f
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-08-10 15:06:23 +00:00
Juan Manuel Cruz
a814140b75 event logger: reduce sample application's RAM footprint
The event logger nanokernel sample application spawns
application fibers and system fibers. This commit reduce
the application's fiber stacks to reduce the global
application RAM footprint and allow it to run on smaller
platforms like Quark D2000.

Jira: ZEP-526

Change-Id: I98f899892e5c5d8ce84f97f6768444cf67277a1a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-08-10 15:05:36 +00:00
Leyi Rong
e72a71a53d net: uip: Fix uip_udp_conns traverse loop in uip_process
the traverse step length should be sizeof(struct uip_udp_conn)
in uip_process when matching the right uip_udp_conn for net_buf

Change-Id: I33c0499582a96e5031ba94f147ff2376726b3f9c
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
2016-08-10 14:57:02 +00:00
Szymon Janc
114985a8a8 Bluetooth: tester: Use SYS_LOG_ERR instead of printk
Change-Id: Ideadc7344dcf7d1cdd550623a02d74c8ad9414f5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-08-10 14:54:19 +00:00
Szymon Janc
ffe8f0ccf4 Bluetooth: tester: Fix extra new lines
Change-Id: Ie3de7d7baeaff386f8683624ee1284834495d6de
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-08-10 14:54:19 +00:00
Javier B Perez
793cef5a86 checkpatch: add ignore for net/ip/contiki directory
Added rule to ignore net/ip/contiki content in the checkpatch style.

Change-Id: I06d8575d2a00d0032099c8a6d804fef3aaad8381
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-10 14:43:01 +00:00
Flavio Santes
b564ee6d76 mqtt: fix: Remove ping function call
Zephyr's MQTT does not implement a client's message queue.
So, a race-condition may be present when multiple messages are
received and processed.

We remove the pinreq function call to allow the mqtt_read function
to handle all the incoming messages.

CONFIG_IP_BUF_RX_SIZE is also updated to allow more messages to be
queued by the IP stack.

Jira: ZEP-669

Change-Id: Ie3ef55b17020e04c6540adf975a66fb004933914
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Flavio Santes
97e1beaf52 mqtt: fix: Eliminate redundant lines by using a common exit point
Use the goto statement to create a common exit point.
Remove redundant code when possible.

Change-Id: I2e22483c6fca4cb501b401164faf97d585ecec3c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Flavio Santes
f8b30eada7 mqtt: fix: pinreq handler function exit condition
The previous version of the pingreq handler function leaves
the semaphore blocked if an error condition is detected.

This patch solves the above described situation.

Change-Id: I4897609fae3f6523244892ae38ffdc5ae85f852d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-10 14:41:00 +00:00
Genaro Saucedo Tejada
2968b3644c sanity: non utf-8 characters are tolerated
Sanity check script was not handling non utf-8 characters as a result
it crashed and didn't kill qemu and test used to hang.

Now tests fail upon untranslatable bytes.

JIRA: ZEP-673

Change-Id: I885a185e0481083501fce15cd51412bfdd26a7d7
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-10 14:31:57 +00:00
Johan Hedberg
6ff2011b96 mailmap: Fix broken author information for Evan Couzens
Once again, broken commits have been merged with incorrect author
information. Fix this in .mailmap.

Before this patch (git shortlog):

viggo.jf.intel.com (2):
      doc: Move code contribution info to wiki.
      doc: Move code conventions to Zephyr wiki.

After the patch:

Evan Couzens (2):
      doc: Move code contribution info to wiki.
      doc: Move code conventions to Zephyr wiki.

Change-Id: I382c06b49fdc5f6c81bc9ec952c5958b4e1ca144
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-08-08 21:24:49 +00:00
Flavio Santes
5bf8679719 crypto/tinycrypt: Update README file
This commit updates the tinycrypt README file.

Change-Id: I7350b3bb18de106d79347fab7f89345250b580c1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-08 21:23:43 +00:00
Leyi Rong
dcafc14162 net: net_context: Fix local ipv4 addr compare with INADDR_ANY
net_context_get will obtain ip addr from uip_hostaddr when the local
ipv4 addr is set to INADDR_ANY. So local_addr->in_addr.s_addr[0] is
represented for the local ipv4 addr content.

Change-Id: Ie6d77f27bdde5ea8568428a61b129eccb253df0a
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
2016-08-08 20:57:17 +00:00
Flavio Santes
a7362cf77f dns: FIX: use byteorder.h functions
The previous version of the DNS Client sample code assumes a
little-endian machine as a target. In this patch we use the byteorder.h
functions to handle the cpu to network order conversions.
Theoretically, this code must run on little and big endian machines.

Cosmetic changes are also applied to other files.

Change-Id: I2b47f6252fa070e0a0253666fde1785530d6aebf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:15:50 +00:00
Flavio Santes
0aa191389c dns: FIX add README_API file and improve sample code
README_API file is added in this patch.

Inline code documentation is improved. More test domains are added.
The README file is also updated to reflect these changes.

Change-Id: Ie670a6559611c6a8d216470e245dbea48369696f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:15:39 +00:00
Ramesh Thomas
e2dbb8059f power_mgmt: PM should use GPS1 instead of GPS0
QMSI boot loader uses GPS0. power.c should use GPS1 for its
purpose because GPS1 is reserved for PM use. Switched to
use GPS1 instead.

Jira: ZEP-647
Change-Id: I653450cd0b42aa80bef21c8a42f4aa39cdaef2ed
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-05 23:14:47 +00:00
Ramesh Thomas
5013d521d3 doc: Fixes a typo in the file system documentation
SEE_CUR -> SEEK_CUR

Change-Id: I62bba618bb942489e01e66e01d5f4806122a4e21
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-05 23:14:25 +00:00
Flavio Santes
df22e226f0 mqtt: FIX: add unsubscribe function and update return codes
MQTT unsubscribe message was not included previously. See ZEP-623.
So, this commit adds the handling functions for the MQTT UNSUBSCRIBE
message.

MQTT high-level API return codes are now unified to only return:
- 0 on success
- -EINVAL when invalid parameters are received
- -EIO on network error

API documentation is also updated to reflect the previous changes.

Jira: ZEP-623

Change-Id: I04d65c303762ce2ecaca73a4f222f0b77fe70503
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Flavio Santes
5280beffab mqtt: FIX: add MQTT unsubscribe/pingresp handling functions
The UNSUBSCRIBE and UNSUBACK functions are added. These functions allow
to create the UNSUBSCRIBE message and to read the UNSUBACK message,
repectively.

Another function to create the PINGRESP message was also added.

Jira: ZEP-623

Change-Id: Ic055e5762051cc9fb5d59a19c6eb974e34014d7e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Flavio Santes
6503654e75 mqtt/subscriber: FIX: update README file
README file now has a Troubleshooting section. It could be useful during
tests.

Change-Id: I925812b9bd62ac00a2f404939c1c0b7d9cf4dfd2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:13:58 +00:00
Genaro Saucedo Tejada
c3341b8a67 doc: removed unneeded variable from guide
Mac OS X guide had an unneeded transient variable.

JIRA: ZEP-616

Change-Id: I1a7cea35830bb786b67aee235337f89c62a4b69f
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-05 23:11:24 +00:00
Flavio Santes
f9ae718824 MAINTAINERS: Add network applications and update tinycrypt sections
Add the Network Applications sections covering the following:
- nats clients
- paho_mqtt_clients
- dns_client

Update the tinycrypt section:
- Add the tests/crypto directory. This directory includes one mbedtls
  test and the remaining are tinycrypt tests.

For more information, see:

    https://gerrit.zephyrproject.org/r/3411
    https://gerrit.zephyrproject.org/r/3412

Change-Id: I389cde59cca0f429baffc1a44b43a6a87b5093fd
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 23:11:12 +00:00
Flavio Santes
fb080a3211 mqtt: FIX: update sample code to include MQTT UNSUBSCRIBE message
This patch demonstrates how to use the MQTT UNSUBSCRIBE message.

The publisher application is updated to fix a typo.

Jira: ZEP-623

Change-Id: I2c302c9f9320687fc39f36726394417db89f06d8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 16:54:54 -05:00
Flavio Santes
dde410e2a6 mqtt: FIX: update hack to handle dummy packet for TCP connect
The zero bytes hack to connect was deprecated by last
commits, so now we send 1 byte initialized to 0 :).

Jira: ZEP-612

Change-Id: I372964bbb102811d33509ad9386d9b360032a180
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 16:53:32 -05:00
Ricardo Salveti
26b9140b9f sanitycheck: add nrf52_nitrogen and nrf52_pca10040
Enable build tests for the nRF52 Nitrogen and nRF52 DK platforms.

Change-Id: Id099167c38a49aa8d9a8a8cb0ed71a9a938e2a46
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-08-05 20:59:02 +00:00
Flavio Santes
57cf077e9c nats: FIX: update hack to handle dummy packet for TCP connect
The zero bytes hack to connect was deprecated by last
commits, so now we send 1 byte initialized to 0 :).

Jira: ZEP-612

Change-Id: Ie9e65fad3945d0babc4287e287be3aa57d68ed5a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:20 +00:00
Flavio Santes
b0cd36040c nats: FIX: add README file
This patch adds a README file describing the known-limitations of our
implementation.

Change-Id: I174db79783861f145ae224eca86f3fe4968e0205
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:20 +00:00
Flavio Santes
9676df04d1 nats: FIX: homogenize return codes and update API documentation
This patch standardizes the return codes:
- 0 on success
- -EIO on network error
- -EINVAL if an invalid parameter was passed as argument or
   received from the server

API documentation is also updated to reflect those changes.

Change-Id: I076d195fde7c6b32b4a52454f312fb8cd8ce2332
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-05 20:50:19 +00:00
Jithu Joseph
93f8009eb6 usb/cdc_acm : Unsupported functions return error code
Poll functions were not implemented for the cdc_acm
USB uart since the underlying USB device controller
always uses interrupts.
We return -ENOTSUP and 0 rather than leaving unimplemented.

Jira: ZEP-595

Change-Id: I02d9e693694d03296da3c815cdda53f151e06f6d
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2016-08-05 20:39:10 +00:00
Andrew Boie
5cc0322c45 zephyr-env.sh: prepend to PATH
Currently, if you source this in one Zephyr tree and then
source it again in a second copy, the PATH will still
prefer tools and scripts the first Zephyr tree.

Change-Id: I658231025b155d19a2bffa25b8062be7ccd06da4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 20:38:08 +00:00
Ramesh Thomas
0e4396917f doc: Add file system documentation
Adds documentation of file system APIs

Jira: ZEP-643
Change-Id: Ieac14a3dcf4913aeba6da2d3dc718eaa09b6cd88
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-05 20:37:52 +00:00
Andrew Boie
4760753ab0 Revert "microkernel: remove deprecated task IRQs"
This reverts commit d73a9bb9c6.
The patch was intended for 1.6.0 release.

Change-Id: Id42058b746a3d2a54e4b1a2983eb58bd10b1ed40
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 20:37:25 +00:00
Genaro Saucedo Tejada
ba57243d98 doc: Clarified Mac OS X set up instructions
Mac OS X set up instructions were missing some important details that
prevent a new user to set up Zephyr development environment on a not
yet configured system.

JIRA: ZEP-616

Change-Id: I0890ec5364a0ce21e38ba4101d285fc8e46a6bd8
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-08-05 20:37:10 +00:00
Juan Manuel Cruz Alcaraz
2939752a3e misc: Remove generic PRINT macros from button samples
Remove generic PRINT macros from button samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: Iae35d69a6a8473afdc1003ed629a21447a6f9a4a
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz
b39399b069 misc: Remove generic PRINT macros from aio samples
Remove generic PRINT macros from aio samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: If50d8de2256f38902b5a4b68c57553cb5e8b8a94
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz
a0007012b7 misc: Remove generic PRINT macros from pci samples
Remove generic PRINT macros from pci samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I5a556637c441b1a4117eb75463d66f7127355a59
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz
a6412042fb misc: Remove generic PRINT macros from flash samples
Remove generic PRINT macros from flash samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I2a9b69e9eb82bbdb03af563bdc49c7ed51681580
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:55 +00:00
Juan Manuel Cruz Alcaraz
ea3a836e7e misc: Remove generic PRINT macros from spi samples
Remove generic PRINT macros from spi samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: Ie377c7bba8b3cf2de05976cef5c4d814fa62b647
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:55 +00:00
Juan Manuel Cruz Alcaraz
6f992e2119 misc: Remove generic PRINT macros from power samples
Remove generic PRINT macros from power samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I65a1caf2e3c2bd78f37d6443f180d674e9562af3
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:55 +00:00
Juan Manuel Cruz Alcaraz
86507b1fee misc: Remove generic PRINT macros from hello world samples
Remove generic PRINT macros from hello world samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I15224913179cdb4832f8185c4dfa85623ada6109
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:54 +00:00
Juan Manuel Cruz Alcaraz
f352ca1e05 misc: Remove generic PRINT macros from synch samples
Remove generic PRINT macros from synchronization samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I1f0a9d66db136c41c29a75b3e02e414b822f881c
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:54 +00:00
Juan Manuel Cruz Alcaraz
d01ad5b591 misc: Remove generic PRINT macros from usb samples
Remove generic PRINT macros from usb samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: Id90c657b05c3b3b9e326f3c1e08d8e8fb113714c
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:53 +00:00
Juan Manuel Cruz Alcaraz
107f38acf6 misc: Remove generic PRINT macros from sensor samples
Remove generic PRINT macros from sensor samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I474efcd1daf8e621acd50d88b3a9662b8cd2b516
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:53 +00:00
Juan Manuel Cruz Alcaraz
4dc93fed2f misc: Remove generic PRINT macros from net samples
Remove generic PRINT macros from net samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I4bec179c99056cce41e1f3495c162f25c3cd2364
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:52 +00:00
Juan Manuel Cruz
184a399f61 driver: ENC28J60 Ethernet SPI module
Adds the ENC28J60 Ethernet module driver.

Origin: Original
JIRA: ZEP-291

Change-Id: I2b5790ecb251f9059f172bcaafadef24bd27207a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:44 +00:00
Baohong Liu
538d8d184d sensor: fix BMI160 sensor hang issue
Fix several issues which are causing the BMI160 app hang.

For SPI duplex transfer, QMSI only supports equal length.
For SPI freq, divider is used. Actual freq is no longer used.

Jira: ZEP-461

Change-Id: I1a1bcc12c6514c3797686dfdad1ce1b852f7dc78
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-08-05 17:35:42 +00:00
Andrew Boie
d73a9bb9c6 microkernel: remove deprecated task IRQs
Change-Id: I06393c8ee0e864105cd0183c92e453638679fe81
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-05 16:55:42 +00:00