usb_dc_ep_write may be executed in an ISR context and should therefore
not take a semaphore with a timeout. The semaphore was initially
introduced to prevent USB buffer overwrite when writing to an endpoint
in a loop. This is not requested anymore since there is an existing USB
transfer API available.
Signed-off-by: Johannes Hutter <johannes@proglove.de>
DMA channel linked list items (LLIs) are allocated when the channel is
configured.
The LLIs should not be freed until the channel is de-configured
Hence, k_free of LLI memory is removed from stop handler.
Also, added code to disable the channel in stop handler.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
After PR #8608 every driver should call ethernet_init(), fixes missing
chunks of that PR.
Fixes: #8752
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
"Getting Started" does not clearly state how to use a custom cross
compiler. This patch adds a new section "Using Custom Cross
Compilers" to it.
To support users without SDK, we have the section "Building without
the Zephyr SDK". But the section is all about prebuilt tools in the
SDK but not build process. This patch adds two pointers "Using 3rd
Party Cross Compilers" and "Using Custom Cross Compilers" pointing to
the actual building process, and let those section describe
ZEPHYR_TOOLCHAIN_VARIANT, which is cross compilers dependent variable.
The patch also clarify what a 3rd party cross compiler is and what a
custom compiler is.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
The code did not check if the icmpv4 header struct is already
pointing to net_buf or not. This meant that the code did not
set the ICMPv4 options and types correctly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The net_addr_pton() did not check the number of ":" characters properly.
For example with following net-shell input
net ping fe80::210:2030:9b:d48efe80::210:2030:9b:d48e
the kernel panics.
Signed-off-by: Walter Xie <41377148@qq.com>
Change #ifndef to #ifdef in the entries that enable the PWM driver
and particular hardware instances so that the enabling is done
properly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When the PWM_NRFX Kconfig option is enabled, add the nrfx driver
to the build automatically by selecting the NRFX_PWM option (it is
a hidden one, so the user cannot do it manually via menuconfig).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Allow gPTP code to be run as a linux process and communicate
with gPTP daemon running in linux host.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The return value from the k_mem_slab_alloc was not read. Hence
adding code to make use of this return value.
Fixes: GH-6681
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit adds a possibility to use Qav (credit-based shaping) in the
ethernet drivers.
There are two parameters exposed through the mgmt api: deltaBandwidth
and idleSlope.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
There is no point in sending Announces with GM chosen in BMCA if it is
expired and InfoIS is changed to MINE.
Check where does the GM info come from and fill the Announce packet
accordingly.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The problem is that net_if_call_timestamp_cb only checked if the
callback was registered for the PORT which invoked the whole action.
There is a possibility, that the callback will be registered, and packet
A will be passed to eth driver. Before the driver is finished with
packet A, network layer will start handling another packet (B) - so it
will unregister the callback for packet A and register it for B. After
that the network driver will finish processing packet A and invoke the
timestamp callback. The mechanism would then only check if a callback is
registered for the port of the driver and invoke the callback for the
packet that was registered earlier (so A instead of B).
This commit fixes that by storing info not only about the port but about
the packet too.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Previously the newer one got dropped.
The older ones will be dropped in a way that the follow up messages for
them will not be sent.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The gptp port number starts from 1, so the check was incorrect.
Use the proper define values before printing stats.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The shell did not check if the gptp port (command argument) is numeric.
Add that check before executing the port info functions.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The current test expects particular order of cap_webusb and cap_msosv2
structures, create alternative structure for comparison.
Fixes: #8732
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Removed redundancy from state binding & make it simplified.
Avoid partial state binding in case of state_binding() function
get called with invalid or IGNORE arguments.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Changes buffer length for all GET handlers as per patter of
< 2 + parameters length (in bytes) + 4 >
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This patched improved architecture of already implemented Vendor
Model. Now there are 4 separate opcodes for Vendor viz;
get, set, set_unack & status. This helps to setup
<command + response> mechanism.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Updated ztest_mock.c to support multiple calls to same mock function
within a single function under test. This allows sequencing mock
return values for improved decision coverage in a test, or simply
when a given function under test calls the same function more than
once with different parameters, or different return values.
Signed-off-by: Morten Priess <mtpr@oticon.com>
If the sys_rand32_get() returns large value, then we might
decrement the clock which is not intended in this test.
Fixes#8657
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Do not provide info message if node type, title, version,
node description is overwritten.
This is the expected behaviour.
Fixes#8360
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit refactors internal functions in arm_mpu.c to use
bitsets and functions taken directly from ARM CMSIS instead of
hardcoded arithmetic literals. In several internal functions
some part of the implementation is abstracted further in inline
functions or convenience macros, to facilitate extending the
arm_mpu.c for ARMv8-M. In addition, the commit adds minor
improvements in internal function documentation.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit abstracts the attribution generation for an MPU
region, determined based on a supplied configuration and the
given size, from the actual implementation, which is placed
in a separate inline function. This allows to have multiple
implementations of attribution generation for different ARM
MPU drivers.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit refactors the _region_init(..) internal MPU driver
function so it gets the region index and a struct arm_mpu_region
as aruments. The latter holds the MPU region configuration that
is to be applied to the region determined by the index argument.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit enforces conditional compilation of mpu_regions.c
in nrf52/CMakeLists.txt depending on whether ARM_MPU_NRF52X
K-option is defined.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This update to the latest master of mcumgr fixes a memory corruption in
the image management and updates the readme.
Fixes#7924
Origin: mcumgr
License: Apache 2.0
URL: https://github.com/apache/mynewt-mcumgr
commit: a837a731b94927c6198e39744cd6d979be23942a
Purpose: Fix memory corruption
Maintained-by: External
Signed-off-by: Johannes Hutter <johannes@proglove.de>
This patch adds I2C Slave support conforming to the syscalls and funcs,
only for the STM32 V2 I2C Driver for the moment.
It is capable of handling multi-master bus setups.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
Add a new test to make I2C transfers between an I2C controller and
an I2C slave driver, either by:
- Using a virtual I2C driver
- Using a physical link and 2 physical controllers
The Physical test uses :
- Two EEPROM Slave drivers each connected to one I2C controller
- Both I2C controllers also act as master and take turns writing
to the opposite EEPROM Slave.
All of this connected physically on the board.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
Add a new EEPROM simulated driver with all it's build infrastructure.
The EEPROM can be loaded/poked from applications by getting its funcs.
It is multi-instance capable, right now 2 instances are supported by
enabling them in KConfig.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
This patchs adds new I2C Syscalls for :
- I2C controllers slave support
- I2C Slave drivers support
I2C Controllers slave support adds 2 new ops to :
- register new slave driver
- unregister slave driver
Slave funcs consists on all the I2C phases :
- read or write request once address matches
- read or write done once the byte has been received/sent
- stop when the trasmit stops
I2C Slave drivers syscall are also added to make new
"I2C Slave" drivers to :
- register them to their I2C controller
- unregister them to their I2C controller
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This patch restructures stm32_i2c_v2 drivers Interrupts:
- NACK failures trigger an I2C event interrupt, so move
handling of NACK failure from error isr to event isr.
- Extract logic of interrupt handling to static functions. Use
isr functions (event & error OR combined) to call these. This
reduces duplication between error isr and combined isr.
- Restructure the error interrupt handling, so that it has no effect
when no errors occured and thus can be called by combined isr.
- Change interrupt logic from if/else to pure ifs for each flag.
This reduces code paths and leads to one call of the isr handling
multiple interrupt conditions, if there's more than one I2C
interrupt flags set.
This is the way it's done e.g. in linux kernels (since 4.14)
drivers/i2c/busses/i2c-stm32f7.c
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
In preparation to implementing slave and multi-master
capabilities for STM32 I2C V2 driver move the checks,
whether all messages of a transfer are valid, before
starting the transaction.
This prevents having to abort a transmission, that is
already partly transmitted.
Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
All the STM32F7 SoCs have a TRNG. Adding support for it is just a matter
of tweaking the #ifdef and including the right file from HAL.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>