Fix the received Extended Advertising PDU's address
resolution latency due to missing reset of pending IRQ in
the NVIC which caused the wait loop from not exit correctly.
Fixes#30243.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When generating LE Extended Advertising Report the device
address can be either in primary or auxiliary channel PDU,
do not overwrite resolving list index if present in primary
channel PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Cleanup standard device request handler.
Pass pointer to setup packet as argument where
it is reasonable.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Cleanup standard device request handler.
Pass pointer to setup packet as argument where
it is reasonable.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The sample only supports device-to-host control requests.
Return -ENOTSUP on host-to-device control requests.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This class does not handle any vendor request,
therefore just return -ENOTSUP on any vendor request.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
HCI commands are always directed to controller and should be
host-to-device class control requests.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Return ENOTSUP if request is unsupported and pass on the error
from encapsulated command/response functions.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Control request handler from CDC ECM implementation does not
care at all about returning errors when a request is not supported.
Return EINVAL/ENOTSUP if request is incorrect/unsupported.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Set data stage length variable to zero as a precaution
so that no trouble happens if control request handler
does not check the request values sufficiently.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add variants of all i2c transfer functions that accept an `i2c_dt_spec`
as the bus specifier. This helps reduce code duplication in device
drivers.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Introduces the `struct i2c_dt_spec` type, which contains the complete
I2c bus information derived from devicetree. It serves the same purpose
as `struct spi_dt_spec` in that it can be constructed automatically in
`DEVICE_DT_INST_DEFINE` macros and provided as a single handle to I2C
API calls. While I2C has much less instance configuration than SPI, this
is still useful to enable the following pattern in device drivers that
support both I2C and SPI comms:
```
struct config {
union {
struct spi_dt_spec spi;
struct i2c_dt_spec i2c;
};
};
```
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Update the Microchip XEC pinmux driver to use system I/O
routine for read/write of registers instead of direct use
of volatile and CMSIS defines. Add GPIO port number to
bindings instead of using hard coded value from chip headers.
Modify SoC DTSI pinmux syntax, requires "pinmux: pinumx {..."
or the DT macros will not work. Since pinmux is used by MEC152x
we update its chip pinmux DT.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Add support for TI TLC59108 an I2C 8-bit LED driver.
Supported blinkink period: 41ms to 10730ms
Supported brightness value: 0 to 100%
This driver supports the following APIs:
1. led_blink
2. led_set_brightness
3. led_on
4. led_off
This is a modified version of the NXP PCA9633 driver.
Signed-off-by: John Kjellberg <kjellberg.john@gmail.com>
Redefine the APIs used to deal with iterable sections to an alias
without the Z_ prefix, so that they can be used by Zephyr applications.
Fix the associated comments so that they are handled correctly by
Doxygen.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Linker APIs are defined in a "#ifdef _LINKER" block. Adding _LINKER to
the Doxygen PREDEFINED list so that they get picked up when generating
the documentation.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
It is enough to set the USB_DEVICE_STACK option to enable
USB device support.
Remove USB_DC_STM32 for mikroe_mini_m4_for_stm32 board
since it is already selected on SoC level.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It is enough to set the USB_DEVICE_STACK option to enable
USB device support. Also the option USB_NRFX is not necessary
here because it is selected in drivers/usb/device/Kconfig anyway.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The USB option alone only caused the driver to be built
and actually has no benefit. Remove it from *_defconfig files.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Replace USB configuration option with USB_DEVICE_DRIVER
since on the SoC level the specific driver is selected.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The USB configuration option is actually a global switch
to enable USB drivers in general, but currently only
the device controller drivers are meant.
USB device controller drivers also have USB_DEVICE_DRIVER option.
Thus the option USB is actually redundant and can be replaced
by the self-explanatory option USB_DEVICE_DRIVER.
The name USB itself is not unique and should not be used as an
configuration option.
With these changes the option USB_DEVICE_DRIVER generally
enables USB device controller drivers. The option USB_DEVICE_STACK
enables USB device support. It is sufficient to enable only option
USB_DEVICE_STACK because it selects USB_DEVICE_DRIVER.
CONFIG_USB Kconfig option is temporary added to subsys/usb/Kconfig.
This is necessary to pass CI and will be removed again
when the USB configuration has been adapted in modules.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Test for dropping log messages was expecting certain number of
dropped messages assuming that buffer size is dividable by the
message size. That was not the case when timestamp was 64 bit.
In that case, additional message is dropped.
Modified the test to take that into account.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
It is mainly for testing purposes where logging is multiple times
reinitialized.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Create a "global" gen_defines.py option and edtlib.EDT constructor
kwarg that turns edtlib-specific warnings into errors. This applies to
edtlib-specific warnings only. Warnings that are just dupes of dtc
warnings are not affected.
Use it from twister to increase DT testing coverage in upstream zephyr.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
An unknown vendor prefix is now a warning. We augment the list of
vendor prefixes passed by the user with a grandfathered-in bunch from
Linux.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>