Commit graph

19237 commits

Author SHA1 Message Date
Neil Armstrong
89bc20dfa7 pinmux: stm32: Do not compile PORTD when not available
The STM32L432 does not have a PORTD gpio, disable it when not available.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-05-08 15:03:15 -04:00
fallrisk
20f41814de arch: Add Atmel SAM4S SoC support
Added support for Atmel SAM4S (Cortex-M4) MCU:
- Kconfig files
- Devicetree files

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2017-05-08 15:03:15 -04:00
Gil Pitney
5e58eb54fc ext: simplelink: Restructure CC3220SDK as SimpleLink SDK
The SimpleLink SDK actually encapsulates a family of devices,
of which cc32xx is just one device.  Other devices can fit
under this SDK directory structure.

This expansion will also allow the import of the WiFi
host driver and its driver porting layer in the future,
inserted at the correct levels in the SimpleLink SDK
directory heirarchy.

Follow the URL (ending in "#directory-structure") referenced in
ext/hal/ti/simplelink/README which explains the SDK structure,
and where devices fit in.

Jira: ZEP-1958

Change-Id: I16515d3e3779de0d55d3b1b8e25029609d1f66c3
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-05-08 15:03:15 -04:00
fallrisk
44c421b4a3 boards: arduino_due: Added DTS to the Arduino Due.
Change-Id: I006f9d4080a1351534ede5cc601e43526c39aa83
Origin: Original
Signed-off-by: Justin Watson <jwatson5@gmail.com>
2017-05-08 15:03:15 -04:00
Carles Cufi
6821df1ef0 Bluetooth: Fix hci_raw's RX buffer alloc
The APIs for allocating RX buffers were modified recently and hci_raw
had not reflected those changes properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-08 21:11:08 +03:00
Anas Nashif
6183d2bde7 doc: remove reference to legacy.h header
Jira: ZEP-2112

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-08 12:53:06 -04:00
Sharron LIU
6c6182dba5 tests:kernel: added tests for printk left justifier
Added test case for printk the '-' indicator in format string
(left justifier).

Jira: ZEP-1599

Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-05-08 09:43:37 -04:00
Anas Nashif
e930a41842 build: honor V=1 when flashing via DFU
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-08 09:15:09 -04:00
Marti Bolivar
88f33dcc1b tests: json: add json_escape() tests
These all pass.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-05-08 08:52:52 -04:00
Marti Bolivar
3c0eac3cba lib: json: escape strings in-place
Currently, json_escape() allocates a temporary buffer on the stack
that's the size of the string being escaped.

Stack space is precious and longer JSON strings can run into the
hundreds of bytes, so re-implement this routine to escape in place.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-05-08 08:52:52 -04:00
Tomasz Bursztyka
b192ea2bd4 doc/kernel: Fix polling documentation
Event parameter were missing on the runtime k_poll_init() calls.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-08 08:28:32 -04:00
xiaorui hu
cffb79a4e1 net: context: set tcp app data len when sending packets
When we send TCP data segment, we need to set the length
of the application data by calling net_pkt_set_appdatalen().
This is done so that sequence number can be properly
advanced when we receive ACK to that pending packet.

Signed-off-by: xiaorui hu <xiaorui.hu@linaro.org>
2017-05-08 08:07:41 -04:00
Bogdan Davidoaia
79ea8685a5 ext: mcux: update MK64F12.svd to MK64F12.xml
The MK64F12.svd file was changed to MK64F12.xml in MCUX 2.2.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-06 10:35:16 -05:00
Bogdan Davidoaia
970320f4c7 ext: mcux: update to MCUX 2.2 for MKW21Z4
Updates the MCUX device header files for MKW21Z4 to MCUX 2.2.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-06 10:35:16 -05:00
Bogdan Davidoaia
e86ccaf5ce ext: mcux: update to MCUX 2.2 for MKW31Z4
Updates the MCUX device header files for MKW31Z4 to MCUX 2.2.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-06 10:35:16 -05:00
Bogdan Davidoaia
50e5daff97 ext: mcux: update XCVR driver to MCUX 2.2
Update the XCVR driver for KW41Z to MCUX 2.2.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-06 10:35:16 -05:00
Bogdan Davidoaia
ab6e354843 ext: mcux: update to MCUX 2.2 for KW41Z
Updates the MCUX drivers and device header files for KW41Z to
MCUX 2.2.

Origin: NXP MCUXpresso SDK 2.2
URL: mcux.nxp.com
Maintained-by: External

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-06 10:35:16 -05:00
David B. Kinder
f930480e16 doc: misspellings in Kconfig files
fix misspelling in Kconfig files that would show up in configuration
documentation and screens.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-05-05 19:38:53 -04:00
Piotr Mienkowski
38d8c863d4 arm: dts: Add DTS support for SAME70 SoC
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-05-05 16:44:41 -05:00
Anas Nashif
1338f49206 gitlint: verify full name in signed-off-by line
Make sure we get full name in the commit message and not the username or
some incomplete data that we need to decipher. We still need to verify
the commiter name that is not part of the commit message body, but this
is out of scope of gitlint.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-05 16:11:11 -05:00
kontais
3b0b7671a0 stm32f4/arm_mpu_mem_cfg.h compile error fix
Signed-off-by: kontais <kontais@aliyun.com>
2017-05-05 10:13:08 -05:00
Carles Cufi
d34c10725b Bluetooth: Enable events based on features
The event mask population used to let the Controller know which events
are relevant to the Host needs to take into account the features
supported by the Controller itself, in order to only enable those that
are indeed valid.

Jira: ZEP-2050

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-05 16:10:48 +03:00
Vinayak Chettimada
fc6d8d1bc4 Bluetooth: controller: Scan Request Notifications
Implement the framework for LE Scan Request Received Event.
The feature is available under the Controller's advanced
features and will be selected implcitly when Bluetooth v5.0
LE Advertising Extensions feature is implemented.

Jira: ZEP-2073

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 15:56:04 +03:00
Vinayak Kariappa Chettimada
a9a72f7bea Bluetooth: controller: Remove unreferenced hci_evt_is_discardable
Remove unreferenced function hci_evt_is_discardable after
introduction of hci_get_class function.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 15:56:04 +03:00
Vinayak Chettimada
b031d76655 Bluetooth: controller: Cond. compile connection state HCI cmds
Conditionally compile connection state related HCI commands.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Vinayak Chettimada
c30ba00fbc Bluetooth: controller: Conditionally compile slave role HCI cmds
Conditionally compile slave role related HCI commands.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Vinayak Chettimada
d39d8224be Bluetooth: controller: Refactor LL Master role to ll_master.c
Move master role related implementation out into a separate
ll_master.c file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Vinayak Chettimada
446923e4d5 Bluetooth: controller: Refactor LL Scan state to ll_scan.c file
Move scanning state related implementation out into a
separate ll_scan.c file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Vinayak Chettimada
6117d1dda7 Bluetooth: controller: Refactor LL Adv state to ll_adv.c file
Move advertising state related implementation out into a
separate ll_adv.c file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Vinayak Chettimada
d9d3f8e7c7 Bluetooth: controller: Add Kconfig options for states and roles
In preparation for refactoring the Controller implementation
into seperate state and role based source files, add Kconfig
options for states and roles in the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-05-05 13:33:11 +03:00
Carles Cufi
cff44ea3f6 Bluetooth: controller: Use sys_le16_to_cpu on all commands
To guarantee code that is endianness-independent, the sys_le* macros
must be used everywhere when accessing multi-byte values from the
command parameters.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-05 12:54:52 +03:00
Carles Cufi
47dedfc992 Bluetooth: controller: Fix overwriting of command parameters
In HCI, the response buffer to a command is the same as the one for the
command itself, requiring command parameters to be processed before the
response is formed on the same memory area.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-05 12:54:52 +03:00
Johan Hedberg
18593e74e1 Bluetooth: samples: Fix passkey display
Passkeys are always 6 digits in length and should therefore be
zero-padded if necessary.

Jira: ZEP-2113

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-05 11:25:57 +03:00
Anas Nashif
efc66840d3 sanitycheck: build with asserts enabled
Catch more issues early by building with asserts enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-04 19:43:08 -04:00
David B. Kinder
1bec7e747c doc: loses misspelling in conn.h
affects doxygen-generated API documentation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-05-04 19:42:50 -04:00
David B. Kinder
9d4c2748db doc: remove kernel version 2 wording
Version 1 kernel (release 1.5 and earlier) is far enough from memory now
to remove the "version 2" wording in the kernel documentation and just
call it "the kernel".

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-05-04 18:25:14 -04:00
Jukka Rissanen
dc0fc57917 net: samples: Common application init API
This creates a common API for network sample applications for
setting up IP addresses etc. The HTTP client application is modified
to use this API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-04 15:58:45 -04:00
Jukka Rissanen
70f334d9f2 http: client: Create a HTTP library
Instead of separate sample application that does everything
related to HTTP client connectivity, create a HTTP client library
that hides nasty details that are related to sending HTTP methods.
After this the sample HTTP client application is very simple and
only shows how to use the client HTTP API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-05-04 15:58:45 -04:00
Bogdan Davidoaia
15e55e1823 ieee802154: kw41z: keep global transceiver interrupt unmasked
There is no need to unmask/mask the global transceiver interrupt
in kw41z_start/stop as the radio interrupt line is enabled/disabled
anyway with irq_enable/disable calls.

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-04 11:58:46 -04:00
Bogdan Davidoaia
cbe030d444 ieee802154: kw41z: fix sync issue in CCA sequence
- set state to IDLE if TMR1 expires, but CCA reports channel as free
- no need to check for CCABFRTX, as the hardware isn't setup to do
CCA before TX

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-04 11:58:46 -04:00
Bogdan Davidoaia
5dc68e3855 ieee802154: kw41z: adjust sequence timeouts
Sequence timeouts should be scaled to 16us, as TMR_PRESCALE was set
to 62.5kHz.

Also, radio warmup times and TX packet length need to be taken into
account.

Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-05-04 11:58:46 -04:00
Leandro Pereira
d260fe26ff boards/galileo: Enable ethernet in the default configuration
Enable it by default now that the eth_dw driver has been ported to the
new IP stack.

Jira: ZEP-1652
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-05-04 11:57:22 -04:00
Leandro Pereira
1c4b09947f drivers: eth_dw: Port to new IP stack
The main difference to how the previous driver operates, is that this
version has zero-copy transmission.  The transmit DMA descriptor is
updated for every fragment that is transmitted from the driver.

Another difference in the transmission path is that this version won't
spin indefinitely while waiting for the DMA transfer to complete; an
arbitrary number of busy checks (20) will be performed, and then
the transmission thread will yield for as long as necessary to finish
the transfer.

These two changes should fix ZEP-472; since that issue was opened for
an older version of Zephyr with uIP, I did not bother going all the way
back to test.

This has been only tested with a Galileo board, using Shared IRQ.

Jira: ZEP-1652
Jira: ZEP-472
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-05-04 11:57:22 -04:00
Kumar Gala
9b874d660c CI: Fix the git commit range we pass on to gitlint
The check-compliance.py script uses gitlint to verify the commit message
and takes a range of git commits to validate via the env var
${COMMIT_RANGE}.  Previously we used ${SHIPPABLE_COMMIT_RANGE} however
for branches that doesn't get us what we want.  So we move to using
origin/${PULL_REQUEST_BASE_BRANCH}..${COMMIT}.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-05-04 11:25:35 -04:00
Carles Cufi
a1ff1a0933 Bluetooth: Consolidate flow control Kconfig
Since Controller to Host flow control is a feature that affects both
sides equally, move it to the top-level Kconfig file and consolidate its
use in both Controller and Host.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-04 18:09:31 +03:00
Paul Sokolovsky
2506e2738e stm32: Don't perform any side effects in irq_update().
The purpose of irq_update() is to cache value of UART IRQ status
register for devices which needs such caching. No other driver
performs any other side effects in this call. For STM32, clearing
TC (tx complete) bit was introduced in 8c079e91c9
which is otherwise titled as a conversion to STM32Cube HAL. Thus,
there does not seem to be specific reasons why this code was added.
On the other hand, it leads to behaviorial artifacts when dealing
with interrup-driven UART code (specific issue seen was delaying
of transmitting every other character).

Change-Id: Id20bf214b36eeb6c09e29cc2e6bfca4f7221a1a4
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-05-04 09:48:08 -05:00
Roger Lendenmann
0bc4a88bc7 sensor: lis2dh: Add support for lis2dh accelerometer
* lis2dh 3 axis accelerometer support on SPI and I2C bus
 * data ready and anymotion type of trigger support

 Tested on Dynastream module D52QD2M4IA-A using SPI

Origin: based on Zephyr lis3dh driver

Change-Id: I2c4e9418b87f09c957bba8f73522bd78830bc809
Signed-off-by: Roger Lendenmann <roger.lendenmann@intel.com>
2017-05-04 09:39:46 -04:00
Johan Hedberg
b484c1eeed Bluetooth: (Re)introduce ACL host flow control
This feature was removed some time ago, but turns out it's important
to have it available for split host-controller setups.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-04 16:38:34 +03:00
Johan Hedberg
70e09b11ea Bluetooth: Introduce buffer type parameter to bt_buf_get_rx
This is preparation for re-introducing host flow control.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-05-04 16:38:34 +03:00
Carles Cufi
ccd4d4f401 Bluetooth: controller: Controller to Host Flow Control bits
Enable the bits corresponding to the new 3 commands supported when
enabling Controller to Host Flow Control, in order for the Host to be
able to enable the feature.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-05-04 15:23:46 +03:00