Commit graph

41120 commits

Author SHA1 Message Date
Anas Nashif
79ba6c5d47 gpio: unify kernel configuration for all architectueres
This also enables GPIO on ATMEL SAM3 when GPIO is set.

Change-Id: I4125af4910d57bed98b0ee4967fb696e3f345e67
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:43:26 -04:00
Anas Nashif
407eb36ec4 sensor: apds9660: remove IP specific GPIO configs
The driver and port used are already configured per port, no need
to hardcode the sample to a specific driver.

Change-Id: I8056e35db1e0970ec4ad56ce14fe5654fac9cf3e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:02:03 -04:00
Anas Nashif
fb385ab066 doc: fixed bullet list for bluetooth
Change-Id: Ia3b8ac2f32704c509504b77a2894b1f38a90f2e7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 09:48:49 -04:00
Anas Nashif
ea54982e99 quark_se: remove hardcoded reset vector for ARC
Change-Id: Iba4d46b50990167aa9e21635a6a8e6c1dd90c5e3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 11:00:35 +00:00
Anas Nashif
4806e8c6c5 Revert "samples: philosophers: reduce stack size used"
This reverts commit 7eb9c884bc.

This change causes failures on arduino 101.

Change-Id: I6f8620b629516a6a81c2b417aa3736752ba40873
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-29 18:51:16 +00:00
Luiz Augusto von Dentz
b76abc0460 Bluetooth: Fix not being able to set CONF_FILE for init test
Change-Id: I750cb062b88fd265c14ae3304ae33cd345683a0f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-29 11:51:18 +00:00
Grzegorz Kolodziejczyk
3639ddb7a7 Bluetooth: drivers/nble: Fix calling cmd from discov callback
Private gatt data from connection is indicator if another operation is
pending. Some att commands may be called within discovery callback
like subscription on ccc (within characteristic discovery procedure).
Without clearing conn private gatt data member, leads to rejection of
called in callback att command due to being "busy".

Change-Id: I72a35ed82dac2f0538f2d1637163bd2302f0b072
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-29 10:50:10 +00:00
Szymon Janc
7c87c089fd Bluetooth: Fix using invalid responder address as peripheral
If Static Random address is used as Identity Address and local privacy
is not used, responder address for slave connection was not set to
Identity Address.

Change-Id: I7a057c0fcb8e6d7e043952a092d16e959841f792
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-04-29 12:07:07 +02:00
Grzegorz Kolodziejczyk
e0922851a1 Bluetooth: tester: Return pre defined db offset on start server
Some IUTs may have predefined attributes in db which aren't take into
consideration while building via tester database. BTP clients should
know about such attribute handle offset change. After start server
we're sure that none of attributes will be added since zephyr db is
constant.

Change-Id: Ia2c6edaa7a2f3ca4a9c88fe00122c808a529dadb
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
2016-04-29 07:52:11 +00:00
Mariusz Skamra
8adb16fc32 drivers/nble: Fix missing write flush() callback
This callback is needed to successfully perform write operation.

Change-Id: I09776dda16dac639320a7e83a66e7a9b31ebea6a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-04-28 17:34:23 +02:00
Mariusz Skamra
76b6716452 drivers/nble: Fix passing NULL pointer instead of conn to write() cb
conn object pointer has to be passed to the write callback instead
on NULL pointer.

Change-Id: Ifde88be0a43bcd9e1acbe11b16512776cd18fc66
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-04-28 17:32:05 +02:00
Mariusz Skamra
a653f8a168 drivers/nble: Fix status returned from on_nble_gatts_write_evt
If attribute has no write callback, BT_ATT_ERR_WRITE_NOT_PERMITTED
error shall be returned.

Change-Id: I9277f8682597ee7f93a1267d2de31b3cc245f1cd
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-04-28 17:29:17 +02:00
Anas Nashif
19542114de samples: gpio: sanitize test and remove obsolete options
- CONFIG_GPIO_DW_0_BITS is not longer available
- Use default printk
- Do not enable debug
- remove useless whitelist in testcase.ini, we already whitelist
  boards

Change-Id: If21795d544e268c26a757b697ce3c9f2e56db65f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-28 12:29:33 +00:00
Anas Nashif
fe1fb2a9b9 samples: magn_polling: include stdio.h and remove redundant configs
Change-Id: I8b2c729761c36c777c675c2b26f9ec7d3a22567c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-28 12:29:14 +00:00
Luiz Augusto von Dentz
e2c1b2b7be tests: test_slist: Add test for sys_slist_insert
Change-Id: I7b478c78050027013f386146bae6198a554f2005
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-28 11:41:15 +00:00
Luiz Augusto von Dentz
e54db2914f misc: Add sys_slist_insert
sys_slist_insert can be used to insert a node in the middle of the list
which previously was not possible with sys_slist_append and
sys_slist_prepend.

Change-Id: Ib9e319469cd4911adf7ddf49c54c3f7390c4c953
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-28 11:41:15 +00:00
Roger Lendenmann
3278f542eb Bluetooth: gatt: include service api definition proposal
* service include macro definition takes reference to
   first service attribute of the included service

Change-Id: Ib2b1defe2c99aea738da791af74a534d56025eae
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2016-04-28 10:35:38 +00:00
Daniel Leung
ee795d87ff boards/arduino_due: remove redundant I2C default kconfigs
Enabling individual I2C controller is done in the SoC kconfig defaults.
There is no need to do that in the board defaults.

Change-Id: I45a62d8bc96a5f42b3fd613f5890bcdf04c92032
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:40 +00:00
Daniel Leung
c977b1b8cd spi/qmsi: don't assign driver_api if init fails
Change-Id: Ia2225dc1a389c49ddb256e66bd0c4ee86e29c4cb
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:39 +00:00
Daniel Leung
75c4a181ab watchdog/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: I118df1333524f774a80602f6a1f2ce95a6e4f1c1
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:39 +00:00
Daniel Leung
cd1981ea04 rtc/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: Ic780b87e7f9372af970d24443d1a231a2f2c513f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:39 +00:00
Daniel Leung
bb7e4ffa6e pwm/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: I2ec5bb2e00d78755f8db1e960f747f9099163eaf
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:39 +00:00
Daniel Leung
0eca2bfc98 counter/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: I3a2eb5bfc7f131c9a700b2d96674c238482ef164
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:38 +00:00
Daniel Leung
fbae4abf14 aio_comparator/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: Iacc2a0d4772e26bf700da009ccdbb74138978ed9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:38 +00:00
Daniel Leung
b78c9b6a5d adc/qmsi: use new DEVICE_AND_API_INIT()
Change-Id: I56af7fa2d4b9bdc09928d6a1db79b0f37b9b5db5
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-28 01:03:38 +00:00
Anas Nashif
af70a288ee Zephyr 1.3.0-rc2
Change-Id: I796f4f5e9d21838224f4afaf5afc20bca1760046
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-27 19:18:00 -04:00
Andrew Boie
6371d21846 philosophers: nanokernel: use empty config
None of the configuration directives for any of the arches were
actually needed.

Change-Id: Id0bf7393b8e2c7e0f5188c50c13d7666cdfcd114
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:14 +00:00
Andrew Boie
edc81265b4 test_timer: nanokernel: use empty config for all arches
Extra config for x86 was unnecessary.

Change-Id: Ic86979e80db2c63e07b328375027acec97e751c7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:09 +00:00
Andrew Boie
3e156748d0 test_xip: nanokernel: use common proj.conf
They were all the same anyway...

Change-Id: I4cf54d7a837d585885990bfcd168e96059349c4a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:04 +00:00
Andrew Boie
7571cdfd59 test_obj_tracing: nanokernel: use common config
The extra config in x86 isn't necessary.

Change-Id: I967a58ae5c04d55c144e9f711a708f43dc023ebb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:59 +00:00
Andrew Boie
a9a3cdd00d linker-tool-gcc: improve readability
This no longer defaults to X86 and instead throws an error if a
supported arch isn't found. Output format now checks CONFIG_ARM
instead of Cortex M3, should be the same for all ARM chips.

Change-Id: Ib9bf07ad93a44b3f7cdac7b52432110776eb23fd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:54 +00:00
Andrew Boie
1bf37fb6d3 test_errno: remove unnecessary use of nanokernel API
Change-Id: I7bc26e11f82f697b980f9eb9105941bc9caeb6c6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:49 +00:00
Andrew Boie
7327c9ee1f nanokernel: move C atomic operations to centralized code
These C variants of atomic operations can work on any arch,
have platforms select them if they don't have ASM equivalents.

Change-Id: I38eb03bb58beff865681ee56ef7bc0fcded1e906
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:19 +00:00
Andrew Boie
97dcf63a5a arch/Makefile: simplify
The arch names and the directories are the same, make it so we
don't have to keep appending stuff to this file as new arches
are defined.

Change-Id: I640526f5cb83fe34f5af14b62e5d06295a4912b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:19 +00:00
Andrew Boie
b2a343dcb0 Makefile.toolchain.zephyr: add nios2 arch
Directory layout per SDK 0.8 structure. Using toplevel libs for
now.

Change-Id: I7852a9def09fb0a5f0a6e496249d2ebb86720d8f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:18 +00:00
Johan Hedberg
48338958e6 Bluetooth: monitor: Update to new protocol format
The updated "monitor over UART" protocol looks like:

    uint16  data_len
    uint16  opcode
    uint8   flags
    uint8   hdr_len
    uint8   extra_hdr[hdr_len];
    uint8   payload[data_len - 4 - hdr_len]

Change-Id: I5fceafe69489a5bfc940d113066f100016f74bc3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-27 18:09:28 +03:00
Anas Nashif
9eaf052778 sensors: sample: this testcase is for arduino_101
Change-Id: Id0299a05aab171621a317e4ea446acd65150d6ac
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-27 15:04:18 +00:00
Bogdan Davidoaia
6aa36a3d0d samples: cleanup environmental sensing README file
Fix typos and wrap text to 80 characters.

Change-Id: I25228c1d63ad391c734be601ed1503f42b4f2468
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-27 14:09:24 +00:00
Tomasz Bursztyka
6fc7566cdd ieee802154: cc2520: Invalid argument should return -EINVAL
-EIO is an error code for operationnal error, not about invalid
argument.

Change-Id: I7064eaf01c6040d2e93ed43df3932d8baed1256e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-27 14:49:41 +02:00
Andrei Emeltchenko
c6f9941311 drivers/nble: Improve debug
Add debug for bt_gatt_notify() and print parameters in
on_nble_gap_conn_update_evt().

Change-Id: I5b61b5dbf508a2ee8e0b79c8636bc2dc710fb2ef
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-27 12:02:33 +00:00
Andrei Emeltchenko
5a19423bb4 drivers/nble: Remove unneeded type cast
Since the header was updated type cast is not needed.

Change-Id: I6a232cd8515fb48ef2a0d16cc064effac7b80bfd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-27 12:02:23 +00:00
Johan Hedberg
18cd8ad091 Bluetooth: Add temporary workaround for MyNewt HCI_LE_Random reliability
For some reason the HCI init procedure doesn't complete on the Arduino
101 using the MyNewt HCI firmware if we send HCI_LE_Random commands
too quickly (which probably is crashing the nRF51 RNG, or something
similar). Adding just a tiny delay makes the init complete reliably.

Change-Id: Ic87a965b0e5cb265a2bee09e23d337d741527773
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-27 11:39:56 +00:00
Johan Hedberg
23b2383cee doc: Bluetooth: Create separate development file
Move development instructions to a separate file to make way for a
more high-level description of the stack. Also add more high-level
text to the main Bluetooth file.

Change-Id: Ic14ef62e6f5f602797b61df8584860dfac575489
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-27 04:39:37 +00:00
Johan Hedberg
43cf2f445d doc: Bluetooth: General language fixes to the current documentation
Fix grammatical errors and try to make the language flow a bit better.

Change-Id: I76b9dd2c88c087a6e4ae49788388a1ec4d198496
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-27 04:39:28 +00:00
Andre Guedes
4dc6927976 device: Remove DEV_* codes
This patch removes DEV_* codes from device.h since they are not used
anymore. All APIs now use error codes from errno.h, following the
conventions from doc/collaboration/code/error_code_conventions.rst.

Change-Id: Ifc363ec8d3d5aa108eaef49d9283b67dcae69ce5
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-27 00:58:18 +00:00
Ramesh Thomas
6d1e3cf96d doc: power_mgmt: Added Power Management documentation
Documented the Power Management subsystem which includes the
power management hook interface, device power management,
device busy status interfac and other APIs. Also included
is a guide to writing Power Management applications.

This has 2 parts.  One is the general description of the
infrastructure and the PMA writing guide which goes in the
'subsystem' area. Other is the API description that gets
automatically pulled in from the comments in the source files.
The API description goes into the section where all other
Zephyr APIs are put.

Change-Id: Id630209b23f931a8fcccb6f59428610298486743
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-04-27 00:57:53 +00:00
Andre Guedes
36c8e09a3a device: Include errno.h
The file device.c uses errno codes so it should include errno.h.

Change-Id: I93e806a9b20b2c9bcb245ac5e86fba70486c9591
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:49 +00:00
Andre Guedes
981caded95 arch: st_stm32: Include errno.h
The files soc_config.c and soc_gpio.c use errno code so they should
include errno.h.

Change-Id: I94237aa294701cc71ed17ea42eca9d8073d4ae47
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:49 +00:00
Andre Guedes
580e659887 drivers: stm32: Include errno.h
The pinmux_stm32 and pinmux_dev_stm32 drivers use errno codes so they
should include errno.h.

Change-Id: I3fd19b338d5525f44207e8c770285ef218dd27a2
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:48 +00:00
Andre Guedes
d38e2fa35d gpio: Fix returning codes
DEV_* error codes are deprecated and should not be used anymore. This
patch replaces DEV_* occurrences by the corresponding errno.h code,
according to the error code conventions.

Change-Id: I2f38c869b4e00d22145e24375796ba6bf216b084
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:48 +00:00