Commit graph

19237 commits

Author SHA1 Message Date
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
Andre Guedes
04cdf8b6e8 ieee802154: 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: I7b098a6107c390b46ed15aaeb9141627e9502727
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-04-26 22:49:48 +00:00
Murtaza Alexandru
f169a66205 sensor: migrate all drivers to new SYS_LOG
Refactor all sensor drivers so that they use SYS_LOG instead of
decentralized systems/functions.

Change-Id: Ibd9443e06004341bc5e9afaf5b49bbec547e073d
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:11:05 +00:00
Murtaza Alexandru
52ccdada9c sensor: split lsm9ds0_gyro driver
Split driver for LSM9DS0 gyroscope in core functionalities and trigger.

Change-Id: I19736b65f45a6c4fc79a1f16423097b89accff24
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:56 +00:00
Murtaza Alexandru
28cf0c210a sensor: split bmc150_magn driver
Split BMC150 magnetometer driver in core functionalities and trigger.

Change-Id: I955ac39c2e995a81fa830776da9c0bcc38d9490a
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:41 +00:00
Murtaza Alexandru
075d081811 sensor: add driver for LSM9DS0 accel and magn
Add device driver for the multi function device (MFD) part of LSM9DS0:
accelerometer, magnetometer and temperature.

Datasheet:
  https://www.adafruit.com/datasheets/LSM9DS0.pdf

Change-Id: I00b9db2c69c6e5229269afacb02bf5f921edabe9
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:41 +00:00
Murtaza Alexandru
676b89cd1a sensor: make runtime configurable attrs continuous
Runtime configurable attributes are now matched with the smallest
available value that is greater or equal to the parameter instead of
returning -EINVAL.

Change-Id: I9ca8e2eba443fcd247c329c6ce71dc2167fb7f03
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:10:40 +00:00
Murtaza Alexandru
f1b95df34e sensor: rename SENSOR_TYPE_* to SENSOR_VALUE_TYPE_*
Rename sensor_value_type enums from SENSOR_TYPE_* to more concludent
name SENSOR_VALUE_TYPE_*. This change is required if we want to
introduce SENSOR_TYPE_* (SENSOR_TYPE_ACCEL - if the sensor/driver
supports accelerometer, SENSOR_TYPE_MAGN - etc.) in the future.
Also it is more clear with this notation what these enums are referring
to.

Change-Id: Ic58e29288669e10c0695e0f86f59b0e57f7ac38c
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:09:41 +00:00
Murtaza Alexandru
1be6d1f6c8 sensor: add the posibility to fetch one data type
Now you can specify the sensor type you want to fetch using
sensor_sample_fetch_chan. This will inform the driver that you want only
one type of data updated, leaving the others unchanged and enabling
different sampling rates for multi function devices (MFDs).

Change-Id: I403e422dffadc697c19a5372ed55ed8f486a2607
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:09:41 +00:00
Murtaza Alexandru
82cca9c56e sensor: fix bmc150_magn compile error
Fix bmc150_magn compile error introduced in I2C register access API
migration patch.

Change-Id: I48f4d6405b4b7ae25beb0fbd46169eac3689ec8e
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Murtaza Alexandru
db06b853d3 sensor: fix init driver_api
Assign driver_api only if *_init is successful.

Change-Id: Ib95cd358af358aec4fc58ff10dcede05fad00d0a
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Murtaza Alexandru
6542e03a33 sensor: refactor bmc150 and lsm9ds0
* Fix coding style so line length does not exceed 80 chars.
* Remove unnecessary casts
* Remove unnecessary variable prefixes (from *_fiber_stack to
fiber_stack)
* Rewrite lsm9ds0_gyro_channel_get into more readable form

Change-Id: I086562644f707d9d6538cb34d000012464b02fe3
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
2016-04-26 18:08:38 +00:00
Johan Hedberg
9ce5e08b56 doc: Remove references to Bluetooth from Networking
Now that Bluetooth is its own subsystem Networking shouldn't reference
it as a sub-section anymore.

Change-Id: Id134f9b9e63cfc6533e35e91c7bc6aedd6e8fdf8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:31:59 +00:00
Anas Nashif
9d006e3119 arduino 101: use QMSI spi driver
Change-Id: Iffff51a2b92f6afd04c96a57678e3cf2262a44ed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 15:26:15 +00:00
Anas Nashif
72f22da617 quark_se_devboard: use QMSI drivers
Change-Id: Id8f380e099f512aa36462f52c6db660a732656f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 15:26:04 +00:00
Johan Hedberg
20e03a4ffa doc: Move Bluetooth into a separate subsystem
This helps avoid having the tree grow too deep.

Change-Id: Ic4055f30b6d6f2ab575b361062d7f44b84237ba5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 17:18:23 +03:00
Johan Hedberg
6a075ace24 Bluetooth: drivers/nble: Initial implementation of bt_storage_clear()
Now that there's a helper for clearing nRF51-side bonds we can use
that in bt_storage_clear().

Change-Id: I9eea4b100834b150e7c55a5141f1624853335c0a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:21:36 +03:00
Johan Hedberg
0b68af523e Bluetooth: drivers/nble: Clear bonds upon init
To ensure reliable behavior when pairing we need to clear the nRF51
persistent memory upon init.

Change-Id: I204bb27e7c6e33dc5dd006ad9937645e907e770f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 15:08:34 +03:00
Daeseok Youn
fa442b0287 microkernel: Match alignment with open parenthesis
fix alignment coding style issue

Change-Id: I29fefd994ffe772a6a52995b83ad5b0bf9a0dd2c
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
2016-04-26 11:10:37 +00:00
Bogdan Davidoaia
c4878335c8 gpio: pcal9535a: use I2C register access API
Use I2C register access API for writing/reading registers.

Change-Id: Ic35b3e7159f9827f2d202d8cd1ae8f26ee6300f1
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Bogdan Davidoaia
fb1ea43be2 sensors: use I2C register access API
Use I2C register access API in drivers of sensors that have
8-bit registers.

Change-Id: I33e016feff09be396eae70fb312de055c49caca7
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Bogdan Davidoaia
9496ec6a4d i2c: change i2c_reg_update_byte parameter order
Swap order of mask and value parameters from i2c_reg_update_byte
function. This is needed make refactoring of sensor drivers that
would use this function easier, since all the register update
functions written for each driver have the mask before the value
in the parameter list.

Change-Id: I7bef7be73e904fca353a492ab9edd2a210df199e
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
2016-04-26 11:06:50 +00:00
Laurentiu Palcu
e7a8c7609a sensor: bmi160: fix regression
The regression was introduced by the following commit:

sensor: bmi160: Use the new GPIO callback API

The problem was that ipm context was not set when registering the
callback.

Change-Id: Icbe8fb9670b9e7e7d489e70adf93ff62fed98935
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-26 10:57:56 +00:00
Laurentiu Palcu
47de28535a sensor: bmi160: switch x86 app to QMSI GPIO driver
Change-Id: I1265507aec8214fbdad4ea3d88cd4358081dfced
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-26 10:57:56 +00:00
Arkadiusz Lichwa
8e34b5869b Bluetooth: L2CAP: Add API to register PSM server
Enables API to register PSM server on BREDR transport.
Adds l2cap_br.c file responsible for BREDR specific functionality to
build path based on Kconfig selection.

Change-Id: I92823b0207ab0da96bfb813353de9f95fa5dd0f4
Origin: Original
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-26 10:58:14 +02:00
Arkadiusz Lichwa
9853a040b9 Bluetooth: L2CAP: L2CAP_DYNAMIC_CHANNEL enabled by default when BREDR
Makes Kconfig L2CAP_DYNAMIC_CHANNEL option autoselected when turns on
BREDR support.

Change-Id: Ib56b0e4d578c322837b79c67a7737322b04414f0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-26 08:26:05 +00:00
Flavio Santes
05bd623aa1 net: apps: Break long strings in loopback test
Use string literal concatenation to break the sample text.

Change-Id: I0729b113e80d3efec909603fbb143d1bc515f165
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-04-26 08:09:01 +00:00
Johan Hedberg
ee3f478687 Bluetooth: Fix monitor init priority
The monitor protocol handling needs to be initialized very early on,
e.g. before HCI driver registration. Use the same priority as used for
other console handlers, except we don't expose this as a Kconfig
option for now.

Change-Id: I61157d62327080eeac7a59bb64e5a18877cc26f6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-26 10:21:19 +03:00
Anas Nashif
bf1356c969 Zephyr 1.3.0-rc1
Change-Id: I794f435cd882abc87f2f37a5c07b6ba0a08ba5f3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-26 00:07:27 +00:00
Juro Bystricky
7989015e6c arduino_101_load.sh: Fixed misspelled envar
Change-Id: Ib7a5e70081585827a1ba9058bbc012933094ff4e
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-04-26 00:07:13 +00:00
Juro Bystricky
ae74c18bea arduino_101_backup.sh: Fixed misspelled envar
Change-Id: I585a60b427de1c4e829da59f596d4f58c7af1d17
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2016-04-26 00:06:45 +00:00
Johan Hedberg
4832da8db7 Bluetooth: drivers/nble: Fix using too large buffer
The nble firmware supports a max ATT MTU of 23 (i.e. the default).

Change-Id: I70f55b00b50b2ad6540850d594a6d2fb89b11d1a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:21:28 +00:00
Johan Hedberg
39e63117c4 Bluetooth: drivers/nble: Fix passing NULL to attr->read()
We should be looking up the appropriate connection object and passing
that to the callback.

Change-Id: I04620b301541c8bda45f20e2b1dcca8f71562821
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:21:10 +00:00
Johan Hedberg
847703d91b Bluetooth: drivers/nble: Fix on_nble_gatts_read_evt() behavior
We need to reset len to 0 in case of failure to prevent the nRF
firmware from reading past the end of buffer. At the same time clean
up the code a bit.

Change-Id: I2ac9a86e0f7704ae55c9b2758e02dfadf650f549
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-25 19:20:58 +00:00