Commit graph

41120 commits

Author SHA1 Message Date
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
Tomasz Bursztyka
60da813a7e misc: Make sure byteorder.h does not get loaded more than once
It's an important header, used in many place and it's thus very easy to
get different sub-system loading it thus leading to redefinition error.
(net_buf and net drivers for instance).

Change-Id: Icbbbc2fc0abcb007d8950dd06b601717960e7215
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-08-05 15:57:26 +02:00
David B. Kinder
534bfd57ab doc: add ncurses to linux dev host setup doc
update /doc/getting_started/installation_linux.rst with
ncurses package for both Ubuntu and Fedora systems

Jira: zep-478

Change-Id: Icd4ba5c2151e96330005e3e31f5ea50b437e4f18
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-04 22:13:50 +00:00
Kuo-Lang Tseng
eed45102f7 MAINTAINERS: add file system and update mbedTLS sections
Added new section for file system. Added test and sample folders
for mbedTLS section.

Change-Id: Iccbd16d0f174e65a4b1f102f6ccf26cc927b2887
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-08-04 22:02:02 +00:00
David B. Kinder
74d2999a44 doc: Remove contributor documentation moved to wiki
Contributor documents are moved to the wiki.zephyrproject.org site
Three references in existing documents updated to point to the wiki.

Change-Id: Ib902b9596020722cf8fec2fc064725f7406297ff
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-04 22:01:10 +00:00
Julien Delayen
54b5085e8a uart_qmsi: Remove uart_qmsi_pm_save_config
One remaining reference to uart_qmsi_pm_save_config
was missed by patch bc60506d3e.

This reference is removed.

This fixes the following error:
...
drivers/built-in.o: In function `uart_qmsi_line_ctrl_set':
/drivers/serial/uart_qmsi.c:439:
undefined reference to `uart_qmsi_pm_save_config'
collect2: error: ld returned 1 exit status
...

Change-Id: I1ceda0e152db5a1c7f70d67c04b931416687031a
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-08-04 21:58:54 +00:00
Flavio Santes
e669d10599 samples/static_lib: Add testcase.ini
Add testcase.ini file for qemu_x86.

We detected an unexpected behavior in sanitycheck before submitting
this patch:

  In testcase.ini, if platform_whitelist contains more than one
  platform only the last platform will work. So, here we just use
  qemu_x86.

  However, we believe this situation is caused by the structure of
  this sample. See mylib/Makefile.

Jira: ZEP-621

Change-Id: I656c1b9a69b93fd9f7b0d98a69f49b9641918a93
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-08-04 18:31:12 +00:00
Paul Sokolovsky
38e3e0b812 Makefile.toolchain.zephyr: Test CONFIG_TOOLCHAIN_VARIANT robustly.
Current code tests treats "" (quotes included) as an empty value for that
varible (as coming from Kconfig). However, that file also used to
integrate with build systems for 3rd-party components, e.g. as examplified
by samples/static_lib, and in that case it will be just an empty string.
So, first strip surrounding quotes, then test for empty string.

samples/static_lib: Update for recent Makefile.toolchain.zephyr changes.

Makefile.toolchain.zephyr is 2-pass now, so needs to be included twice.
ARCH needs to be defined *before* including it. Otherwise, just used
CROSS_COMPILE and TOOLCHAIN_CFLAGS set by it.

Change-Id: I56e963d0d107c77390395682d60400cf6ca62337
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2016-08-04 18:31:12 +00:00
viggo.jf.intel.com
3cbd600dc5 doc: Move code conventions to Zephyr wiki.
Move content from doc/contribute/conventions.rst to Zephyr wiki.

Change-Id: Icfad83c15e65bc7b4a5a9cebf2ee530446422087
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-08-02 06:48:35 +00:00
Iván Briano
1a47abe5bf pwm qmsi: Add suspend/resume
Implement saving and restoring context of the PWM controller when the
application goes to SYS_PM_DEEP_SLEEP. No action is taken for other
states at the moment.

This functionality is implemented in the shim driver first to enable
the feature, but will later be moved into QMSI.

Change-Id: I5784f6a2c63caaea5785ca5d92bb6cc3bc9fa4cc
Signed-off-by: Iván Briano <ivan.briano@intel.com>
2016-08-02 06:48:21 +00:00
Javier B Perez
dfc15d3a48 driver: sensor: lsm6ds: remove dead code by kconfig options
Removed dead code inside sensor_lsm6ds0.h. There is no kconfig option
CONFIG_LSM6DS0_I2C_ADDR_6A neither 6B.
Also the #define LSM6DS0_I2C_ADDR is not in use.

Change-Id: Ib5a7f40d0d61542ed81687227df3795ba52ec725
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-02 06:47:39 +00:00
Inaky Perez-Gonzalez
1029e4d992 doc: makefile doesn't print unneeded output of pwd
Change-Id: Ieff46e5509bab3f23562f020f3b9420f814d33eb
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-08-02 06:47:21 +00:00
Amit Kucheria
975d92c038 soc: nrf5x: Add support to read and write to gpios
Change-Id: I9bded784c8e635a271b88a551b65b7268ea7e2d3
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-08-02 05:50:50 +00:00
Julien Delayen
bc60506d3e uart_qmsi: Implement suspend and resume functions
In order to restore uart context after entering
SYS_PM_DEEP_SLEEP, suspend and resume functions
are called.

The following parameters are restored:
 - All registers for the UART device.
 - UART clocks.

The FIFO control register cannot be read back and is
not stored in the device configuration.
The default parameters are applied for them.

The suspend/resume functionality is implemented in
the QMSI shim layer as a fast and temporary solution,
it will be removed and migrated to QMSI later.

Change-Id: I4be9246f6aa5a6e0d91df54c1c69574060136607
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
2016-08-02 05:38:01 +00:00
viggo.jf.intel.com
ce26aeeba8 doc: Move code contribution info to wiki.
Move content from doc/contribute/changes.rst to Zephyr wiki.

Change-Id: I01d8011075438c899b3d1a92c44573826e97c994
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
2016-08-02 05:33:53 +00:00
Maureen Helm
dc631750fa nxp_kinetis: Refactor K64F init to use CMSIS register accesses
The K64F SoC initialization previously used macros and structs
custom-defined in Zephyr in order to access peripheral registers.
Refactored it to use CMSIS-style register accesses from the ksdk
instead.

Change-Id: I80975c62de07ec95cf830e99cd5b0abb9623acd0
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-08-02 05:27:35 +00:00
David B. Kinder
c9663f5424 doc: update linux update/upgrade instructions
Linux package update/upgrade instuctions were incomplete (on
Ubuntu the instructions updated the local database but didn't
actually do the upgrade).  On Fedora, the dnf update command was
deprecated in favor of dnf upgrade.

Change-Id: I83e126cf924d9c3720fcfb77b0d5abda943a6af5
Jira: ZEP-516
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2016-08-02 05:26:29 +00:00
Jaakko Hannikainen
2652c0e5a9 net: contiki: Add NULL check to neighbor polling
The function is getting called with NULL bufs, so uip_len cannot be
called on them. The stack further down handles NULL buffers correctly.

Jira: ZEP-474

Change-Id: I85fb045ec76bea2a83c64d0f72eabba4e661f5f4
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
2016-08-02 05:25:59 +00:00