When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: #24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
Tests were failing as they were looking for an alias which didn't exist
Also, because some code in kscan_handlers.c wasn't compilable
Signed-off-by: Mark Olsson <mark@markolsson.se>
Changes dependency for I2C so that it's enabled if kscan is enabled.
This is to allow the kscan_ft5336 sample to run.
Note: LVGL has KSCAN as a dependency.
Applies to the mimxrt10{50,60,64}_evk boards.
Signed-off-by: Mark Olsson <mark@markolsson.se>
Adds device tree nodes, pinmux definitions and configures Kconfig
defaults for the ft5336 touch panel driver on the
stm32f746g_disco board.
Signed-off-by: Mark Olsson <mark@markolsson.se>
The period argument of a k_timer needs an offset of one tick from the
value computed in user code (because periods get reset from within the
ISR, see the comment above this code for an explanation). When the
computed tick value was 1, it would become 0. This is actually
perfectly correct as a k_timeout_t to be passed to z_add_timeout().
BUT: to k_timer's API, K_NO_WAIT means "never" (i.e. the same as
K_FOREVER) and not "as soon as possible", so the period timer would
not be reset. This is sort of a wart, but it's the way the API has
been specified forever.
The upshot is that for the case of calling k_timer_start() with a
minimal period argument (i.e. one that produces "one tick"), the
period would be ignored and the timer would act like a one shot. Fix
the clamp so it can't produce K_NO_WAIT.
This also adds a filter for absolute timeouts, which (while that's
sort of a pathological usage) were getting that one tick offset when
it wasn't appropriate.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Z_IS_ENABLED2 uses true and false, however when we preprocess the linker
scripts we invoke the compiler with `-x assembler-with-cpp` so
_ASMLANGUAGE ends up being defined and thus stdbool.h wouldn't convert
'true' and 'false' to '1' and '0'.
Move the include of stdbool.h outside the #ifndef _ASMLANGUAGE check so
that 'true' and 'false' get converted correctly.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The SAM D5x and E5x series SoCs include the "Cortex-M4F" core, not the
FPU-less "Cortex-M4" core.
This commit fixes the incorrect CPU compatible for the SAM D5x and E5x
SoCs (note that this file is included by `same5x.dtsi`, which is used
as the base device tree header for the SAM E5x series).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E54 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E53 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E51 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM D51 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM D51, E51 and E53 SoC series Kconfig files were missing the
`ARM` architecture symbol selection.
This symbol must be selected at the SoC level; otherwise, build will
fail because the symbol is not selected by anything and other ARM-
specific configurations depend on it.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.
Fixes#24646
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Replace DT_CPU_CLOCK_FREQUENCY with a PATH based reference to cpu@0
(DT_PATH(cpus, cpu_0)) and than getting the clock_frequency property:
DT_CPU_CLOCK_FREQUENCY -> DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
This lets us remove DT_CPU_CLOCK_FREQUENCY from dts_fixup.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The sensor is on the nrf9160_innblue22 not nrf9160_innblue21. This
causes CI build failures since there is no dts node for the sensor
on the nrf9160_innblue21 board.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Use DT_INST_FOREACH macro to combine code used for multiple instances.
Remove unnecessary Kconfig options for UART instances.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Adding port information for uart tx and rx pins in dts, so that it can
be more systematically retrieved in the uart driver.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Change DT_GPIO_GECKO_SWO_LOCATION to use new DT_INST and DT_PROP macros
and remove defining it in dts_fixup.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST_ defines. As part of this conversion we
remove the Kconfig options for per GPIO controller enables and instead
get that information from device tree. This means we now disable each
GPIO controller by default in the DTS and have each board dts enable the
GPIO controller ports it needs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
board support nrf9160_innblue22 includes the sensor in
nrf9160_innblue22_common.dts, explicit overlay can be removed
Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
This commit adds the asynchronous UART API testing support on the SAM
R21 Xplained Pro board.
The SERCOM3 module is used as the secondary loop-back UART, which is
required to run this test.
Note that no external UART loop-back connection is necessary to run
this test, because the SERCOM3 UART TX and RX pads are configured to be
internally connected; it is, however, still necessary to configure the
pinmux because the module pads are not connected until the pinmux is
configured.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Replace DT_ALIAS_GPIO_x_LABEL with DT_NODELABEL references to get the
device name for the gpio ports.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Tell GitHub linguist to ignore the `.pat` generated test pattern files
that are used by the CMSIS-DSP tests (and potentially others as well,
in the future).
This prevents GitHub from classifying them as "Max language" in the
language statistics.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Adding support for nRF9160 based InnBlue board V2.1. Supports both
Secure and Non-Secure configurations along with various sensors
(lis2dh12 / hts221) and devices(i2c / pwm).
Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com>
Move the FPGA GPIO init to use the devicetree.h macros instead of
dts_fixup.h. This allows us to remove dts_fixup.h on mps2 based
platforms.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Although it is not clearly specified in the UART API, this function
is supposed to return 0 when the TX interrupt is disabled, regardless
of whether anything could fit into the TX buffer or not (this can be
concluded from looking at implementations of several samples and tests
present in the tree, also almost all UART drivers are implemented this
way).
The problem in the uart_nrfx_uarte driver case is that the flag that
allows generation of the TX interrupt is not cleared directly in the
uart_irq_tx_disable() function but this clearing is deferred to the
end of the current transmission, in case one is in progress, and hence
it is done in the interrupt handler. Consequently, when the interrupt
handler is not entered between calls to uart_irq_tx_disable() and
uart_irq_tx_ready() (e.g. when both functions are called in a loop
executed in the interrupt context), the latter may return an invalid
value.
Fix this problem by additionally checking if the TX interrupt was
requested to be disabled, not only if it is already disabled in
hardware.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Espi bus interrupts need to re-enable after espi reset to get
all espi bus and vw signal interrupts.
Signed-off-by: Venkataramana Kotakonda <venkataramana.kotakonda@intel.com>
Epsi slave need to respond with an OOB_RST_ACK for OOB_RST_WARN sent by
master during host reset. Enable interrupt for OOB_RST_WARN to receive
signal changes and respond with ACK.
Signed-off-by: Venkataramana Kotakonda <venkataramana.kotakonda@intel.com>
This default-y option allows continued use of the legacy devicetree
macros.
There are no functional changes yet, but when this is default n,
old-style DT code won't build. At that point, adding any of these will
be a fix to keep old-style code working:
- "CONFIG_LEGACY_DEVICETREE_MACROS=y" to prj.conf
- "-- -DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the west build command
- "-DCONFIG_LEGACY_DEVICETREE_MACROS=y" to the cmake command
This option can be changed to default n in time for the Zephyr 2.3
release. That will provide users of Zephyr 2.2 with a smooth migration
path to the new devicetree.h API after 2.3 is released, which
nonetheless will alert them immediately that something is wrong due to
build errors.
Unfortunately, __DEPRECATED_MACRO is not sufficient in all cases as a
warning to users. This is because, at least in GCC, macros defined
using __DEPRECATED_MACRO cannot be used in preprocessor lines like
"#if DT_SOME_LEGACY_MACRO".
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
SPI1, which is used by the LoRa radio, has the following
configuration:
SCK: PB_3
MISO: PA_6
MOSI: PA_7
NSS: PA_15
Update the pinmux configuration and documentation to reflect this.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
The check of the SF_TXDATA_FULL flag is only done on the register
address and not on the actual register content.
Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
Test is checking if alarm handler is executed at request time or later.
However, validation did not take into account wrapping of the counter.
Fixed by taking into account case where counter wraps.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fixes test which did not take into account that counter may
wrap (nrf51 has 16bit timers) and was setting alarm to wrong
value. Error was not seen on platforms with higher top value.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>