Predefine ATOMIC_DEFINE in the Doxyfile so that documentation output is
generated correctly. In order to simplify the predefinition
ATOMIC_BITMAP_SIZE has been introduced.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Fixed addressing as specified in ISO 15765-2 encodes the source and
target address of a device or function inside the CAN ID according to
SAE J1939.
In order to allow to receive incoming requests from different nodes,
the CAN filter mask has to be set such that the source address is
ignored in the receive context. In addition to that, flow control
frames have to be sent back to the actual source of the request, which
requires adjustments to the TX CAN ID.
This commit implements above features and thus allows ISO-TP to be
used in a network based on SAE J1939 or NMEA-2000.
Signed-off-by: Martin Jäger <martin@libre.solar>
The arch_timing_* are not defined if timing functions are not
enabled, which results in compiler warnings about implicit
function declarations. So guard the header with its own
kconfig so the header can be unconditionally included by
other enough though timing functions are not enabled.
Note this is done inside the doxygen @defgroup or else
doc build would fail as timing_api group cannot be found.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds the bits to record execution time of eviction selection,
and backing store page-in/page-out in histograms.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds more bits to gather statistics on demand paging,
e.g. clean vs dirty pages evicted, # page faults with
IRQ locked/unlocked, etc.
Also extends this to gather per-thread demand paging
statistics.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add discovery of standard descriptor values. This provides a shorthand
instead of doing a read by UUID, allowing the application discovery
procedure to re-use the discover parameters for simple descriptors.
Fixes: #21489
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add Server Characteristic Configuration definitions for bit values
and attribute value.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add BT_UUID_IAS for Immediate Alert Service
Add BT_UUID_LLS for Link Loss Service
Add BT_UUID_HPS for HTTP Proxy Service
Add BT_UUID_ALERT_LEVEL for Alert Level
Add BT_UUID_URI for URI
Add BT_UUID_HTTP_HEADERS for HTTP Headers
Add BT_UUID_HTTP_STATUS_CODE for HTTP Status Code
Add BT_UUID_HTTP_ENTITY_BODY for HTTP Entity Body
Add BT_UUID_HTTP_CONTROL_POINT for HTTP Control Point
Add BT_UUID_HTTPS_SECURITY for HTTPS Security
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Adds a parsing mechanism for Composition data page 0 in the Config
Client API, and uses it in the shell module to parse the incoming
composition data.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
The first byte of the composition data status message is the returned
page index, not the status of the request. This is now reflected in the
API.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Create net_l2_send() function which will be called by each L2
sending function so that we can catch all the network packets
that are being sent. Some L2 layers send things a bit differently,
so in those cases call the net_capture_send() directly by the L2
layer.
Add network packet capture call in receive side after the pkt has
been received by the RX queue handler. This avoids calling the
net_capture_send() from ISR context.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add infrastructure to allow user to configure the system so that
all the network packets, that are sent to or received from a specific
network interface, are sent to remote system for analysis.
The captured network packets are placed as a payload in UDP packet,
which is then sent inside a tunnel to a remote host. The host can
then receive the packets and for example show them in wireshark.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add get/set helpers to store information whether the net_pkt
is captured already or not. This bit is used to detect capture
loop and avoid recursion.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IPIP tunnel capability bit helps to detect which network
interface supports IPIP tunneling.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Usually, GCC builtin or arch-specific atomic functions are being
used. The corresponding kconfigs are "selected" by architecture
or SoC kconfigs. CONFIG_ATOMIC_OPERATIONS_C is usually used to
override the GCC built-in or arch-specific atomic functions when
these two are not supported. So change the priority of #include
so that C version is included first if selected, and skips
the inline versions of the other two variants. Or else there
will be two compiled versions of atomic functions: inline version
and the compiled C version. Note that the arch-specific version
and builtin are swapped, so the builtin one is now the default.
Fixes#33857
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The builtin atomic header file should not include the syscall
header that is generated from C version of atomic functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Implement SO_BINDTODEVICE socket option which allows to bind an open
socket to a particular network interface. Once bound, the socket will
only send and receive packets through that interface.
For the TX path, simply avoid overwriting the interface pointer by
net_context_bind() in case it's already bound to an interface with an
option. For the RX path, drop the packet in case the connection handler
detects that the net_context associated with that connection is bound to
a different interface that the packet origin interface.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
An option has been added which can be passed to setsockopt
which allows the user to set & get the dtls handshake timeout,
either before first handshake or online.
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
Some tools consider this as commented code because of the ifdef, so
remove that and fix a coding guideline violation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This functions is being called across the tree, no reason why it should
not be a public API.
The current usage violates a few MISRA rules.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Introducing PPP dialup features to enable e.g. usage of nrf9160
based board as a dialup modem for transferring ip data over PPP
(e.g. windows dial up), i.e. usage of Zephyr PPP as a server for
providing MTU/MRU, IP address and DNS addresses for a PC:
- PPP LCP MRU option (configurable)
- PPP server: IPCP ip and dns address peer options to enable
providing IP and DNS addresses for PPP peer.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
Use a combination of fixed-clock and fixed-factor-clock devicetree
nodes for describing the clock dividers/multipliers of the NXP Kinetis
System Clock Generator (SCG) present in the KE1xF SoC series.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Split ARM and ARM64 architectures.
Details:
- CONFIG_ARM64 is decoupled from CONFIG_ARM (not a subset anymore)
- Arch and include AArch64 files are in a dedicated directory
(arch/arm64 and include/arch/arm64)
- AArch64 boards and SoC are moved to soc/arm64 and boards/arm64
- AArch64-specific DTS files are moved to dts/arm64
- The A72 support for the bcm_vk/viper board is moved in the
boards/bcm_vk/viper directory
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Also, explicitly check for NULL.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Return -ENOSYS when implementation is missing and -ENOTSUP if the
feature is not supported. Those are 2 things. Missing implementation
(-ENOSYS) means that the driver is lacking support for the feature,
-ENOTSUP means we have an implementation but some parameters or
conditions makes the request unsupported.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The commit adds macro that, using the DTS identifier, allows to
extract flash area label from DTS.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Write this in terms of DT_GPIO_CTLR_BY_IDX instead of the lower level
DT_PHANDLE_BY_IDX for clarity and parallelism with things like
DT_SPI_DEV_CS_GPIOS_PIN, which is written using DT_GPIO_PIN_BY_IDX
instead of DT_PHA_BY_IDX.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The API is deprecated as it was decided to build in the flash protection
service into write and erase procedures.
This is solution chosen for fix following issue:
When two or more threads writes to flash device it is
possible that flash protection will be enabled by one of
threads despite another thread(s) still needs it disabled.
fixes#3127
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Made write_protection handler not mandatory.
flash_write_protection_set() becomes no-operation.
If write_protection handler is provided by the driver implementation
it will be called within flash_writ() and flash_erase().
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This is a helper which allows you to skip the intricacies of instance
numbers to express the intent of "give me a random enabled node with
this compatible; I don't care which one".
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Our description of 'compat' parameters is all over the place.
Make it consistent by picking one.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Unified define used for handling sparc case in static and
runtime packaging. Reworked macro for storing argument in
static packaging.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added parameter to CBPRINTF_STATIC_PACKAGE which indicates buffer
alignment offset compared to CBPRINTF_PACKAGE_ALIGNMENT. When offset
is set to 0, macro assumes that input buffer is aligned to
CBPRINTF_PACKAGE_ALIGNMENT. When offset is positive, macro assumes
that buffer address is shifted by given number of bytes to
CBPRINTF_PACKAGE_ALIGNMENT alignment.
Extended cbprintf_package to use len argument as alignment offset
indicator when calculating length only (package pointer is null).
Features are not available for xtensa platform which seems to
require 16 byte alignment from the package. It is only an assumption
due to lack of the documentation and may be fixed in the future.
Feature allows to avoid unnecessary padding when package is part of
a message and preceeded by a header of a known size. For example,
message header on 32 bit architecture has 12 bytes, long doubles are
not used so cbprintf requires 8 byte alignment. Without alignment
offset indicator, package containing just a string with one argument
would need 4 byte padding after the header and 4 byte padding after
the package. Message would be 32 bytes long. With alignment offset
indication both paddings are not needed and message is only 24 bytes
long.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
XCC does not support using the deprecated attribute for enum
as it is based on old GCC 4.2. So nullify the macro to avoid
compilation errors.
Fixes#33548
Signed-off-by: Daniel Leung <daniel.leung@intel.com>