The assert for error checking used the wrong variable.
data_buf was checked instead of the ret variable.
Fixes#22656
Coverity-CID: 208192
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
This test was whiteboxing the _current_cpu pointer to extract the CPU
ID. That's actually racy: the thread can be preempted and migrated to
another CPU between the _current_cpu expression and the read of the ID
field. Do it right.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Coverity believes that a field is null when it isn't. Duplicate the
assert from 20 lines up in hopes it learns better.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The existing stack_analyze APIs had some problems:
1. Not properly namespaced
2. Accepted the stack object as a parameter, yet the stack object
does not contain the necessary information to get the associated
buffer region, the thread object is needed for this
3. Caused a crash on certain platforms that do not allow inspection
of unused stack space for the currently running thread
4. No user mode access
5. Separately passed in thread name
We deprecate these functions and add a new API
k_thread_stack_space_get() which addresses all of these issues.
A helper API log_stack_usage() also added which resembles
STACK_ANALYZE() in functionality.
Fixes: #17852
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Interrupt routing on x86-64 is done entirely at runtime,
we should skip all 64-bit targets not just QEMU.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A few test header files have C++ guards around them, but are incorrect.
Those files had a leading `#` placed before `extern`, which is
incorrect. This commit simply removes those leading `#` characters.
Signed-off-by: Brooks Prumo <brooks@prumo.org>
This makes simulate command advertise with proper UUID so the likes of
central_hr can connect to it when simulating:
hrs simulate on
Registering HRS Service
Connected: 00:aa:01:01:00:24 (public)
Start HRS simulation
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Added subsys argument to the callback, updated one driver which
used it and test cases.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add privacy configuration when using the split controller for the test
basic_conn_encrypt. The handling with or without controller based
privacy affects the RPA handling in the host due to different
connection complete events being used. This affects the overall pairing
procedure as the addresses are inputs to the pairing functions.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Since the callback enable and disable functions are deprecated, but
cannot be re-implemented in terms of other API, add back an old-style
interrupt configuration test that uses the deprecated flags and
functions in the way existing code would do. The test module
internally disables the deprecation warnings.
Remove the test for the deprecated read/write functions, incorporating
a basic check into the module that tests deprecated callback functions.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Use the new API and replace the enable/disable callback calls with pin
interrupt configuration instead.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use the new pin and interrupt configuration API.
NOTE: Because hardware is not available this has been build-tested
only.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add the common config structure as a prefix of the driver-specific
config structure and use the devicetree GPIO pin counts to initialize
it.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update the intel_s1000_crb test app:
() Update configuration calls to use new flags.
() Separate pin configuration into setting it to input, and
setting the pin for interrupt.
() Use gpio_pin_get/set() instead of gpio_pin_read/write().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
IO extenders may provide input signals to LEDs or sensors where
leaving the signal undriven may result in increased power consumption
or misbehavior. The SX1509B powers up with all signals configured as
inputs. Provide a way to indicate which pins should be set as output,
and their initial signal level, when the device is configured.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Previously the check would fail if a higher pin was present in the
callback set. Callbacks should only be told about pins that are
relevant to the callback, so reject unless exactly the expected pin
was provided.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Exclude the mps2_an385/mps2_an521 as we try to run on qemu and that
doesnt support the GPIO/LED so the tests will fail. For now exclude
the platform completely until we can just do a sim run exclusion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
- Updates gpio driver and device tree files to the new GPIO Config flags
- Implements the new port_* APIs
- Update I2C and PWM Drivers to use new GPIO config
- Add esp32.overlay to gpio_basic_api test
- refactor convert_int_type, regs struct
- remove config_polarity
- add kConfig notes
Tests:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_basic_api
- tests/drivers/gpio/gpio_api_1pin
Board:
- esp32 DevKitC V4
Note about interrupts:
The ESP32 requires specifying a CPU interrupt to be used for GPIO
interrupt signals. CPU interrupts can be either level or edge (or
special) triggered, but not both.
Please check gpio/Kconfig.esp32 for more info.
Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
Enables the 2-pin gpio test on the rv32m1_vega_ri5cy board by adding a
dts overlay and configuring pinmuxes on the arduino header.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
When checking the behavior of pull configurations delay long enough
for the signal to stabilize. Checking without a sufficient delay may
indicate a false failure.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The debounce flag is to be provided to the pin configuration, not the
pin interrupt configuration.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
LPC54114 to use D0 and D1 pinout.
LPC55S69 to use A0 and A1 pinout.
Pins enabled to be used as GPIO for 2 pin test gpio_basic_api.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
LPC54114 to use D0 and D1 pinout.
LPC55S69 to use A0 and A1 pinout.
2 pin test gpio_basic_api uses pins set up in boars' pinmux.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Keep promise of testing 1 pin only, don't attempt to test other pins
when verifying gpio_port_* API functions. Use BIT macro to create a bit
mask.
Fixes: #19692
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Added configuration for the udoo_neo_full_m4 board and
the initialization of its GPIO test pins via IOMUX controller.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
The test verifies that the output pin appears to be shorted to the
input pin by confirming output low and high read low and high.
Failure should block progress through the test as subsequent tests
will not pass.
Replace the use of k_panic() to halt the test with an infinite loop
that doesn't splatter the console with stack traces and register
dumps.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Enables the 2-pin gpio test on the mimxrt1050_evk board by adding a dts
overlay and configuring pinmuxes on the arduino header.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adding overlays so that users can run this test on the following
boards:
- cc3220sf_launchxl
- cc3235sf_launchxl
- cc1352r1_launchxl
Instructions on pins to connect are included in the overlay files.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API.
Tested on external SX1509B breakout board and Thingy:52.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>