Commit graph

41120 commits

Author SHA1 Message Date
Andrei Emeltchenko
23d22043a4 usb: usb_dc_dw: Fix valid endpoints check
Fix check for valid endpoints; issue is found in harness testing.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
1b1c5f72d9 tests: usb: Add write() and set_callback() tests
Add more tests for invalid EP testing.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
dad6ddef7f tests: usb: Cleanup tests
General test cleanup and remove optimized variables.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
e952033559 samples: usb: mass: Add whitelist mass storage on ram
To support mass storage over USB in RAM we need a board with
sufficient RAM. Fix failing tests for boards with low memory.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
d0bc6891d8 tests: usb: Add usb_read() for invalid endpoint
Check that reading invalid endpoint does not succeed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
b8bab7b3c1 native_posix: Enable USB device for the board
Enable USB device and turn on appropriate tests in sanity check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
9fa5d9a5bf tests: usb: Fix checking error code
Instead of checking for -EINVAL check that return is not successful
since USB device may return other error code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
4f2674f164 samples: usb: Add depends_on gpio
Add gpio dependence, fixing build for native_posix.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
69726bbccb usb: tests: Enable other boards for test
Enable other boards with USB device supported

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Andrei Emeltchenko
35a81562e8 samples: usb: hid: Enable harness for the sample
Enable harness so we can execute smoke tests on the hardware with
command line:
sanitycheck --device-testing --device-serial /dev/ttyACM0 -p <BOARD>
  -T samples/subsys/usb/hid

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-18 12:16:05 -04:00
Kwon Tae-young
689d71b291 arm: Add support for MINI-M4 for STM32 Board
Add configuration, dts and documentation for the MINI-M4 for
STM32 board based on the STM32F415RG SoC.
See https://www.mikroe.com/mini-stm32f4 for more details.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-04-18 11:12:16 -05:00
Kwon Tae-young
a7199b757d soc: st: add STM32F415RG
This commit adds support for STM32F415RG.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2019-04-18 11:12:16 -05:00
Armando Visconti
f458a50938 driver/audio: mpxxdtyy: Added support for 2 microphones (stereo)
In stereo case the pdm stream continuosly alternates 1-bit from
the left channel with 1-bit from the right channel. In this case
we need first to demultiplex channels bits on byte basis.
Then the Open_PDM_Filter library has to be called twice, one for
each channel.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-04-18 11:09:46 -05:00
Jacob Siverskog
bb09c458c1 cmake: Prevent infinite recursion
If SDK_VERSION for whatever reason is unset cmake will end up in an
inifite recursion loop, which for me crashed using cmake version
3.13.4 and exits with an error using 3.14.1.

This may happen if ZEPHYR_TOOLCHAIN_VARIANT is set to "zephyr", but
ZEPHYR_SDK_INSTALL_DIR is invalid (or unset).

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2019-04-18 09:23:46 -04:00
Alexander Wachter
78714b4ff4 boards: arm: nucleo_f746zg: Activate CAN on nucleo F746zg
This commit adds CAN support for nucleo F746zg.
Furtermore CAN was added in stm32f7.dtsi and pinmuc_stm32f7.h
CAN_RX: PD0, CAN_TX: PD1

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-04-18 09:23:20 -04:00
Henrik Brix Andersen
917cb432ee sensor: fxos8700: add support for hardware reset pin
Add support for pulsing the hardware reset pin of the FXOS8700 high
during initialization.

According to the datasheet, this is required for the I2C/SPI bus
auto-detection logic to work properly if the VDD/VDDIO power
sequencing order cannot be guaranteed.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-18 09:22:56 -04:00
Erwan Gouriou
08d41ecff5 dts: stm32f412Xg: Factorize package definitions
2 identical packages were defined for stm32f412 SoC, invariant "g".
Merge them in new sinclge stm32f412Xg.dtsi.
Update matching boards accordinlgy.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-04-18 09:22:21 -04:00
William Fish
1e5e8829c7 drivers: sensor: APDS9660 WhoAmI check logic
APDS9660 sensor driver missing WhoAmI check

signed-off-by: William Fish <william.fish@manulytica.com>
2019-04-18 09:15:56 -04:00
Ulf Magnusson
86b0c22dc4 kconfig: Avoid potential issue parsing generated_dts_board.conf
Splitting a string like 'foo="bar=baz"' on '=' will give ['foo', '"bar',
'baz"'] instead of the intended ['foo', '"bar=baz"']. split() with
maxsplit=1 to avoid potential issues.

Not seen in practice. Just some future safety.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:49:46 -04:00
Ulf Magnusson
247337a0d1 shell: kconfig: Put 'menuconfig SHELL' in top-level menu
The 'Shell Options' menu contains just the 'menuconfig SHELL' menu in
the menuconfig interface.

Remove the 'Shell Options' menu and put 'menuconfig SHELL' directly in
the top-level menu instead. Also change the prompt from "Enable shell"
to just "Shell", to make it consistent with "Logging".

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:47:42 -04:00
Ulf Magnusson
60c395024f genrest: Include all parents in menu paths
Previously, symbols not defined with 'menuconfig' with children weren't
listed in the children's menu paths. It was deliberate, but it's
probably an anti-feature in retrospect, because it can make it harder to
find stuff by following the menu path.

Don't try to be clever and just list all the parent nodes in the menu
path.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:47:15 -04:00
Ulf Magnusson
aec74f692c kconfiglib/menuconfig: Various behavior/UI improvements
Update Kconfiglib and menuconfig to upstream revision 90c5573c19, to get
these commits in:

    Warn for unquoted argument to 'source', etc.

    Print a warning suggesting to add quotes for things like

      source foo/bar/Kconfig
      menu title
      prompt unquoted

    Example warning:

      Kconfig:32: warning: style: quotes recommended around
      'lib/Kconfig.debug' in 'source lib/Kconfig.debug'

    That quoteless syntax is supported for compatibility with old
    versions of the C tools. It only works for a single word.

    ==================================================================

    menuconfig: Include all parents in menu paths

    Previously, symbols not defined with 'menuconfig' with children
    weren't listed in the children's menu paths. It was deliberate, but
    it's probably an anti-feature in retrospect, because it can make it
    harder to find stuff by following the menu path.

    Don't try to be clever and just list all the parent nodes in the
    menu path.

    ==================================================================

    menuconfig: Fix display issue for optional-prompt menuconfigs

    _shown_nodes() needs to check whether invisible 'menuconfig' symbols
    with optional prompts have visible children, so that they can be
    shown outside show-all mode. Previously, only 'config' symbols were
    checked.

    ==================================================================

    menuconfig: Remember last saved/loaded path and improve
    _conf_changed

    Remember the last path that was manually saved/loaded instead of
    reverting back to standard_config_filename() (e.g. .config).

    Remember the path to the last saved minimal configuration separately
    as well.

    Also improve the _conf_changed behavior when loading a .config
    within the interface. Instead of always treating it as needing to be
    saved, check if it's outdated, like for the .config file loaded on
    startup.

    Also make the exit message ("No changes to save", etc.) always
    include the target .config file, which is helpful. Previously, only
    the save message did.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:46:15 -04:00
Ulf Magnusson
9964cf29ac kconfig: Add missing quotes after 'source' and 'menu'
Missing quotes are accepted in some places for compatibility with the C
tools, e.g.

  source no/quotes/Kconfig
  menu Title

It looks broken though. Fix the two places in Zephyr that skip the
quotes. A style warning will be added.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-18 08:46:15 -04:00
Andrzej Głąbek
c28fdc7a0f ext: hal: nordic: Update nrfx to version 1.7.1
Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.7.1/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.7.1
commit: 9d68726e41c321f1772c187bd12d82f5b13104f1
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-04-18 12:41:23 +02:00
Pawel Dunaj
56a2691e1c bluetooth: host: Unref conn on direct adv start error
Unref conn when direct adv start exits with an error.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-04-18 11:59:12 +02:00
Pawel Dunaj
d4dbab9f83 bluetooth: host: Use correct identity when direct advertising
When starting direct advertising use correct identity during
connection lookup.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-04-18 11:59:12 +02:00
Pawel Dunaj
26cfbf81db bluetooth: host: Save id when allocating CCC cfg slot
Make sure that along with address identity is saved too.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
2019-04-18 11:58:27 +02:00
Charles E. Youse
8905b0fe21 drivers/gpio_intel_apl.c: fix return value for gpio_pin_read()
gpio_intel_apl_read() should set *value to 1, not 2, when the
GPIO input is a logical high.

Fixes: #15499

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
2019-04-17 22:24:48 -04:00
Kumar Gala
6b4007e5ed samples: sensor: bme280: Convert code to use printk
There isn't any specific need to use printf here, convert to use printk
instead.

Fixes #14997

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 19:49:01 -05:00
Henrik Brix Andersen
c0a1f46363 boards: rv32m1_vega: fix I2C bus references
Fix the I2C bus references in the RV32M1 Vegaboard documentation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-17 19:47:22 -05:00
Henrik Brix Andersen
55502df866 boards: rv32m1_vega_ri5cy: add STS LED to DTS
Add the status LED to the DTS of the RV32M1 Vegaboard RI5CY device
tree.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-04-17 19:45:15 -05:00
Kumar Gala
c38df1515c ext/hal: stm32l4xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32l4xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
0a482cd92a ext/hal: stm32l0xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32l0xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
073ece5080 ext/hal: stm32f7xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f7xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
3ec47dcf1c ext/hal: stm32f4xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f4xx_hal_tim.c:3615:24: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
0404cf90f0 ext/hal: stm32f3xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f3xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
198387dcd9 ext/hal: stm32f2xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f2xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
a51bfc8dc4 ext/hal: stm32f1xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f1xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Kumar Gala
ee69d0049b ext/hal: stm32f0xx: Fix warnings for extraneous parentheses
Building with clang reports the following warnings:

stm32f0xx_hal_tim.c: error: equality comparison with extraneous
parentheses [-Werror,-Wparentheses-equality]
  else if((htim->State == HAL_TIM_STATE_READY))
           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

Removing the extra () fixes the warning

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-04-17 16:46:17 -05:00
Sebastian Bøe
397abd41c8 cmake: DT: Add support for out-of-tree binding root directories
Just like board's can be placed in out-of-tree BOARD_ROOT's, we now
support DeviceTree sources and bindings being placed in out-of-tree
DTS_ROOT's.

This required for out-of-tree drivers that use DeviceTree.

To implement this we get rid of various user-settable CMake variables
like DTS_APP_BINDINGS, DTS_APP_INCLUDE, and instead have ZEPHYR_BASE,
APPLICATION_SOURCE_DIR and out-of-tree directories conform to using
the same DTS_ROOT concept and directory structure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-17 16:25:41 -05:00
Sebastian Bøe
9472299226 cmake: DT: Change from -Idts/common to -isystem dts/common
All DT include directories are system directories, except for
dts/common. There is no reason for dts/common to diverge, so we align
it with the other directories to be consistent.

Also, we move it closer to the other include directories.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-17 16:25:41 -05:00
Song Qiang
3751275fb0 drivers: gpio: stm32: add ASCR configuration for L47x+
For STM32L47x/48x series devices, register ASCR should be configured to
connect analog switch of gpio lines to the ADC.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-04-17 16:25:28 -05:00
Georgij Cernysiov
25ea5fea59 drivers: pinmux: stm32: add F4 RTS/CTS definitions
Adds USART RTS/CTS definitions based on STM32F469X/STM32F479X.

Co-authored-by: Benoit Leforestier <benoit.leforestier@gmail.com>
Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
04da64db76 drivers: serial: stm32: dts binding, and fixup for flow control
Allows to enable initial RTS/CTS hardware flow control
in the dts.

Co-authored-by: Benoit Leforestier <benoit.leforestier@gmail.com>
Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
3f0f617bb1 drivers: pinmux: stm32: reformat L4 pinmux
Reformat L4 pinmux to be consistent with other pinmux files,
and for a better reading.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
5b5f0a5f22 drivers: pinmux: stm32: add L4 RTS/CTS definitions
Adds common L4 RTS/CTS definitions.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
6751c1ff73 drivers: pinmux: stm32: add F4 RTS/CTS definitions
Adds common F4 RTS/CTS definitions.

Co-authored-by: Benoit Leforestier <benoit.leforestier@gmail.com>
Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
78eed34b78 drivers: serial: stm32: add serial hw flow control
Adds RTS CTS hardware flow control support.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 16:09:54 -05:00
Georgij Cernysiov
c74c131e4f drivers: serial: stm32: add err_check
Adds 'err_check' implementation.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
2019-04-17 15:58:56 -05:00
Harry Jiang
39d4babf00 board: stm32_min_dev: Add USB support
Add support USB to stm32_min_dev board

Signed-off-by: Harry Jiang <explora26@gmail.com>
2019-04-17 15:53:07 -05:00