Commit graph

19237 commits

Author SHA1 Message Date
Laurentiu Palcu
dbe2c5faff bmi160: Add sample application
Origin: Original
Change-Id: I8bd3fa30f3794de0fa22ffff8e3eaeb213612741
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
5d2a200381 sensor: add driver for BMI160
This patch adds support for the Curie's BMI160 IMU chip. Only polling is
supported in this version.

Datasheet:
http://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BMI160-DS000-07.pdf

Origin: Original
Change-Id: I759856d4bf123c21e9e4928f32bdf8f00aeeed24
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
d43e152845 sensor.h: Add helper functions for unit conversions
Since sensors' API uses SI units, all attributes and channel reading use
SI units. Hence, conversions from other units to SI are necessary.

This patch adds helper for converting:
 * m/s^2 to Gs (and vice versa);
 * degrees to radians (and vice versa);

Change-Id: I49f8763bed253ff6bde4c97618766b05f97da699
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:48 +00:00
Laurentiu Palcu
3ed141ecd3 sensor.h: add new attributes
This patch as following attributes:
 * SENSOR_ATTR_OFFSET: for setting offsets in order to adjust the read
   values;
 * SENSOR_ATTR_CALIB_TARGET: for setting target that the chip internal
   algorithms need to converge to when calibrating;

Change-Id: I3aae5aa06bcd1376423e58b0511267ea43038718
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2016-04-02 23:08:47 +00:00
Johan Hedberg
9eec87a0ef Bluetooth: Remove unnecessary double check for CONFIG_BLUETOOTH_CONN
Change-Id: I3329cf1314cbcd4e6bb7015b9b52fd6c52526567
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-02 20:59:09 +03:00
Johan Hedberg
a85b1f7752 Bluetooth: Shorten set_adv_parameters to set_adv_param
The shorter form "param" is used elsewhere and this helps avoid overly
long lines.

Change-Id: Ie76497b5bf30e72099d13a26db9cacb8cd2c9c79
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-02 20:59:09 +03:00
Anas Nashif
fb663cac0d Zephyr 1.2.0
Change-Id: Ie223f458776c81439db8cd4c3a25b4753599588b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:35 -04:00
Anas Nashif
297c920dc7 sanitychecks: update footprint numbers
Change-Id: I66c71f7322e1529d7b5bfda5b29eeb078b13daf1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-02 08:45:16 -04:00
Daniel Leung
7328eb0d9e pinmux/galileo: include board.h
Or else, PINMUX_NUM_PINS is not found.

Change-Id: I48c173395f2cda72e8915c46aad964e83509a605
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-01 09:52:04 -07:00
Anas Nashif
5ddc8934cc arduino_101/quark_se_devboard: speed up flashing the SS
Set the target to ARC to speed up flashing. the difference:

before
 downloaded 27320 bytes in 50.685825s (0.526 KiB/s)

after

 downloaded 27320 bytes in 3.396626s (7.855 KiB/s)

Change-Id: I53ca26f97eefd40e869662b137f5a659082aa478
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-01 14:14:10 +00:00
Maciek Borzecki
883baedc64 arm: linker: fix indentation
Change-Id: I72a4947119f1f2b6fcd59fadbe38a54b6bc1ea61
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:58 +00:00
Maciek Borzecki
f95e15a228 samples: bluetooth: ipsp: exclude STM32F103RB from the test
Exclude STM32F103RB based platforms from the test. The SRAM is overflown
by 14kB.

Change-Id: I37c2905ed2706a89d9a199bc49518937659ac997
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:58 +00:00
Maciek Borzecki
9e8e0e8e82 tests: bluetooth/shell: exclude STM32F103RB from microkernel test
For STM32F103RB targets, the SRAM is overflown by 2-3kB in microkernel
test. Platforms with this SoC can still be built for in the nanokernel test.

Change-Id: I012b93cf8dfec74292f7ab228f4b2fca1a4f3444
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
109b10b26e test_sha256: disable test for STM32F103RB SoC
Exclude STM32F103RB platform from the test. The SRAM is overflown by
>20kB, while the CPU itself has 20kB of SRAM.

Change-Id: Ic9aad6b88d517b62f4a18901cd698ba9a9defb40
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
54a055426d test_tickless: disable test for STM32 SoCs
Disable the test for STM32 based platforms until an implementation of
timestamp counter becomes available.

Change-Id: I2e50dac36dbfdc61081610c0e0cf1ace8892f602
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
3b0a701ac1 bluetooth: shell: declare commands as const
Take advantage of shell_init() accepting const commands array. This
moves ~280 bytes from SRAM to the text section.

Change-Id: Id64ee766e3c6cf7ce4cc623a1e21d3dacf33f050
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Maciek Borzecki
1ab798ae5a samples: shell: declare commands as const
Take advantage of shell_init() accepting const commands array.

Change-Id: Ie8c023de62cda75f7057184555806401f0381a1a
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Maciek Borzecki
5eb51feeb0 console: shell: expect const commands array
The commands array is not expected to change and can be declared
const. This allows callers to cleanly declare their commands lists as
const, effectively moving the structures from SRAM to code section.

Change-Id: Ie1710622b8cfa609e129eb79712f910f1d1aace3
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Maciek Borzecki
24f008bd65 sanitycheck: add nucleo_f103rb abd stm32_mini_a15
Enable build tests for Nucleo-F103RB and STM32 MINI A15 platforms.

Change-Id: I26ccdb6edd537f5dfc9c0120e5a6d4ee1ed63dbb
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:56 +00:00
Vlad Dogaru
320651281c sensor: bmp280: fix pressure value
The comments in the sensor header specify that pressure should be
expressed in kPa, but the bmp280 driver returns a value in Pa.

Change-Id: I6d5346db250d1a01a1e5e31fb1d8685ab5dc405b
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-04-01 14:48:00 +03:00
Baohong Liu
45a269f3b0 boards: arduino_101: Enable SPI flash only when SPI is enabled
SPI flash depends on SPI. Enable the SPI flash driver only when
SPI is enabled.

Change-Id: I902588b806a4a5773fddb58a7567a8e0d4ba9fe0
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-04-01 10:40:32 +00:00
liu.lei
acd673eb1b pinmux: Fix where to look for PINMUX_BASE_ADDR
Fixes this built error:
zephyr/drivers/pinmux/dev/pinmux_dev_quark_mcu.c:138:18:
error: 'PINMUX_BASE_ADDR' undeclared here (not in a function)
.base_address = PINMUX_BASE_ADDR,

Change-Id: I54f15bc262cb887117f7b56660bcf85983daa877
Signed-off-by: liu.lei <lei.a.liu@intel.com>
2016-04-01 10:38:44 +00:00
Arkadiusz Lichwa
7420276282 Bluetooth: BR/EDR: Enable cancel Passkey Notify authentication
From now on user/app has possibility to dismiss Passkey Notify authentication
on acceptor side even with DisplayOnly interface. The action on 'Cancel' API
in this case is disconnection.

Change-Id: I4be198482c23c0ccaeb0112b72ff269037e03583
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-04-01 09:26:24 +00:00
Luiz Augusto von Dentz
7b4ddaf73d Bluetooth: GATT: Force write to CCC when reconnecting
Some devices may actually lose track of CCC setting so this is required
to work around the problem, in case the device does work track CCC
properly the extra write shall not cause anything more than one extra
round trip thus it is probably work doing it anyway.

Change-Id: I9e5ed3fa459e4617c6fae094d0ce0f80cb2682e4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-01 09:24:02 +00:00
Andrei Emeltchenko
0d446131d2 drivers/nble: Implement read CUD attribute
Implement bt_gatt_attr_read_cud() making working peripheral_esp app.

Change-Id: Ic9634bf31a39ae9cd55279de34ee4c0c0995a4dd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-04-01 10:46:39 +03:00
Johan Hedberg
74dbbcac61 Bluetooth: Make controller to host flow control conditional
Deal with controllers that don't support controller to host control.
This may potentially lead to dropped packets so make a clear warning
log of the issue.

Change-Id: Ie8fdaed826a072fd157343721222f618328d59a3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-01 08:41:39 +03:00
Johan Hedberg
4763bb9c86 Bluetooth: Move supported commands reading to common_init()
Reading supported commands isn't an LE-specific feature, so the
command should be in common_init() rather than le_init().

Change-Id: I613bbe8d39b4c2b6dadc45a710bc59568ec9b488
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-01 08:37:18 +03:00
Anas Nashif
1d894f98c2 Zephyr v1.2.0-rc2
Change-Id: I36fd9b96d247184b4a986467f1609a9c3b0cbd9f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-31 21:22:26 -04:00
Peter Mitsis
28e5d0287e test_fifo: Reorganize directories
Splits the test into two clear sub-categories: microkernel and nanokernel.
This is done to maintain consistency with other tests that do the same
(e.g. test_obj_tracing, test_sema, test_stackprot, test_timer).

Change-Id: Iddb1ec8d569a9d953fb8af5ce08e87b51995f821
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:07:28 +00:00
Tomasz Bursztyka
71e26d0d03 tests: Add a test suite for the single linked list generic
It will extensively test all provided functions within a normal usage of
the API.

Change-Id: I723203a29c3f3416b464030a7fe34eac5fff6095
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Tomasz Bursztyka
6c1f11ec97 include: misc: Add a generic single linked list API
As for double linked list provided through misc/dlist.h, this provides a
generic API for single linked list in misc/slist.h. It follows the same
naming rule as in dlist.h

Change-Id: I955bd16a201bc9987c29f5a9e3e3d8447682a71e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Peter Mitsis
30aa2602ad test_fifo: Fix issues flagged by checkpatch
Fixes line length and whitespace issues flagged by the checkpatch tool.

Change-Id: Id49cd5341571ac7893929a2836fe5e06166abe06
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:00:34 +00:00
Sebastien Griffoul
4b70134d1a eth_dw: fix buffer leak when RX frames are too large
When an ethernet frame is larger than UIP_BUFSIZE,
a net_buf is allocated but never released. Therefore
after few bad frames, no more RX network packet
can be received.

Fixed by allocating the net_buf after checking
the frame length.

Change-Id: I436487e3c26d739de347b4db6facc3a3dbebbe75
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-03-31 23:18:17 +00:00
Yannis Damigos
ee587d08a8 tests: kernel: test_context: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_context to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for
test-context.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I219f63063ee2dca5b0326e25141d8b37f4cd1d74
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:52 +00:00
Yannis Damigos
32e450024e tests: kernel: test_pool: reduce ram requirements
Reduces the amount of memory allocated for task's stack.
This permits the test_pool to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for test-nano.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ib8041f6d91e8ffc5fcb16dc73de1f7662d9596da
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Yannis Damigos
60695b18a0 tests: kernel: reduce ram requirements
Reduces the amount of memory allocated for stack (both fiber
and task). This permits test_sema and test_mutex to compile
on boards like nucleo-f103rb. Sanitycheck script passes all
tests for test_sema and test_mutex.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ie25288bbbbfa64bfc5f7463639bfb09639cc184f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Daniel Leung
8a05b46325 rtc/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

This also separates IRQ_PRI into one for DW and one
for QMSI, to follow the convention of every other
drivers.

Change-Id: I338f819f71c18fa9e17015e8a588a3d0207350c6
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:25 +00:00
Daniel Leung
f1ead35cc6 watchdog/wdt_dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ic73783189db57059d2b7f3727e4802e1b2e27931
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
2d1ed03a8f pwm/k64_ftm: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ifd65097a65f80539cac073f95aadc2d8e42efb9f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
8f1986f8ee samples/drivers: extend PWM app to FRDM_K64F
This extends the pwm_dw sample app to build for
FRDM_K64F board also. Because of this, pwm_dw
has been renamed to pwm.

This allows us to put it through sanity test
to catch build breakage.

Change-Id: Ie4d7442af43ede58f4cec0ec28643384a685321a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
17b3a85308 pwm/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ifdbb5e3a997795ef577350d88f8cb06877eb6463
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung
5e886b2748 gpio/sch: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.

Change-Id: Ib8158f00a6c6616360ddbcf63981f1a85911c1b9
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:23 +00:00
Dmitriy Korovkin
d78a2e34d6 galileo: Fix SPI driver init level
On Galileo Gen2 board SPI uses GPIO pin for CS.
Thus spi_intel driver must be initialized after gpio_dw,
so it's init level must be more that gpio_dw's one.

Change-Id: If2e5fb1106afe01e5567cf3fe72063bdc94ad3d2
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 23:17:00 +00:00
Dmitriy Korovkin
79351142e4 arm: Fix wrong function comment
Change-Id: Ifd977289c92d3c88ee2ca93dd964307372d49ca0
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 21:28:23 +00:00
Dmitriy Korovkin
8d76b7b083 arm: Disable unaligned access traps
GCC enables unaligned memory access for ARMv6 and above.
Once unaligned memory access is allowed, there's no need
for the unaligned memory access trap.

The change prevents the situation when the compiler
generates code that uses unaligned memory access, but
the CPU generates an exception when this code runs.

Change-Id: Id33f2264c631772e5c561e76fb579d8b7bc26e1e
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-31 21:28:23 +00:00
Andre Guedes
6e71586c37 i2c: qmsi: Add support for default configuration
This patch extends the i2c shim driver so it supports the 'default
configuration' infrastructure which enables the user to specify a
default configuration for the I2C device. The default configuration
is set during driver initialization.

This patch also changes Quark SE and D2000 Kconfig.defconfig files so
the i2c default configuration is set to '0x12' which means standard
bus speed, 7-bit addressing and master mode. This is the same value
used when DW driver is selected, by the way.

Change-Id: I06e0dc3c29e8da2f3317db5bef285177f2e92c9a
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-31 13:18:26 +00:00
Daniel Leung
0761a1da87 samples: enable sanity check of I2C driver on Arduino Due
This adds the necessary tags to enable building the grove_lcd and
i2c_fujitsu_fram sample apps, so that the Atmel SAM3 I2C driver
will be built to test for build breakage.

Change-Id: I4adfb6336e82a6d407bbd5e9888c27d5f6bc5be1
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 11:47:01 +00:00
Johan Hedberg
cfe54794f2 Bluetooth: tests/shell: Add some help text
Change-Id: I09cdec8c710120219412eccf69ba25e95679ecfb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-31 08:02:22 +03:00
Johan Hedberg
a27641b1c5 Bluetooth: samples/README: Fix sanitycheck references
Change-Id: I6e54a80de1f9a95f7b22ee2213e764ed93c495b2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-03-31 07:57:23 +03:00
Daniel Leung
cb83db8c74 i2c/dw: remove kconfigs that are SoC specific
Remove those kconfig options that are SoC specific, and should not be
configurable via kconfig.

Change-Id: Ia62888838877da4627419bd36c261d5254761acd
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 01:11:23 +00:00