Drop device_get_binding() for microbit, using a gpio_dt_spec instead.
Rename the 'button' global to 'button_work' since it's a k_work
related to the button and does not actually represent the button
itself.
Fix a typo in the docs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Save a bit more SRAM on bbc_microbit by tuning some Kconfigs.
Mark some arrays const to try to avoid stack allocating them while
we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use DEVICE_DT_GET on the chosen node directly.
The only in-tree board using the Kconfig option is rv32m1_vega_ri5cy.
It already sets the chosen node in the application overlay, albeit
incorrectly, so just fix it there and remove the now-redundant Kconfig
setting. That in turn triggers other build errors for this board, but
they don't seem to be related to this sample.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use DEVICE_DT_GET_ANY instead of hard-coding a device label property.
As far as I can tell from in-tree drivers, "TEMP_0" is nRF specific
and refers to nodes with compatible "nordic,nrf-temp", so use that and
clean up the driver Kconfig while we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This allows RST documentation to do something like this:
See :dtcompatible:`vnd,foo` for more information.
This is transformed into a link to documentation for the "vnd,foo"
compatible.
Some devicetree compatibles may be handled by multiple bindings.
This can happen when the binding file is bus-dependent. Therefore, to
make this work, we need to change the way gen_devicetree_rest.py works
to ensure we have a good source of information for this compatible
regardless of how many bindings are associated with as follows:
- When only a single binding is associated with a compatible, the
:dtcompatible: link goes directly to the per-binding HTML page.
- When multiple bindings are associated with a compatible, this goes
to a new generated "disambiguation" page which links to all the
per-binding pages.
To avoid clashes, we stick the disambiguation pages into a
compatibles/ subdirectory of the generated bindings index root
directory.
Also reorganize the generated bindings output directory into
.../bindings/subdir/binding.rst files. For example,
dts/bindings/arm/arm,dtcm.yaml now gets its generated content in
.../bindings/arm/arm,dtcm.rst.
This brings the 'category' of binding (like 'sensor', 'i2c', etc.)
into the URL, which is a useful hint.
Signed-off-by: Martí Bolívar <marti.bolivar@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>
The NRF UARTE has an undocumented feature that when you flush the RX
FIFO, the RXAMOUNT register is not cleared to zero if the FIFO is in
fact empty. This fix is correcting something that was most likely a
typo.
Signed-off-by: Petri Oksanen <petri@iote.ai>
Add validation of the case when package buffer is not aligned to
CBPRINTF_PACKAGE_ALIGNMENT.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Extended test to validate case when package buffer is not aligned to
CBPRINTF_PACKAGE_ALIGNMENT.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@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>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The identifiers used in the declaration and definition of a function
shall be identical [MISRAC2012-RULE_8_3-b]
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If the first network interface is down when the net config init
is run, then the IP addresses etc would be set to wrong network
interface. So when initializing the network, try to first find
a network interface that is auto started and use that to configure
IP addresses etc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When printing network interface information print index or
index + pointer, so that the output is more user friendly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As DAD is not done for point-to-point links, we can mark them
valid immediately. If this is not done, then the address will
never be picked as a source address to a sent packet.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Useful to know what flags are set for the network interface
so print them in the shell by the "net iface" command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This can be used to implement tunneling, VPN etc. The virtual
interfaces can be chained together to support multilayer
network interfaces.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a function that allow caller to create IPv4 header with
possibility to set various fields in the header.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Application can disable IPv4 or IPv6 later if those are not
needed nor used for a given network interface.
Fixes#14581
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This adds to page on the x86 virtual memory about how to specify
extra page table mappings during build.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This changes the assert when a large page is encountered to
copying the page directory entry to the new page directory.
This is needed when a large page entry is generated by
gen_mmu.py. Note that this still asserts when there are entries
of large page at higher level.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This makes the gen_mmu.py script to error out if the reserved space
for page table in zephyr_prebuilt.elf is not large enough to
accommodate the generated page table. Let catch this at build time
instead of mysterious hangs when loading the page table at boot.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The whole page table is pre-allocated at build time and is
dependent on the range of address space. This kconfig allows
reserving extra pages (of size CONFIG_MMU_PAGE_SIZE) to
the page table so that gen_mmu.py can make use of these
extra pages.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add support for u-blox BMD-300-EVAL. Also includes BMD-301-EVAL
and BMD-350-EVAL. All share the nRF52832, and are functionally
equivalent to the nRF52dk_nrf52832 with the exception of not
having debug-in and the shield SWD header.
Note that header pin numbers noted in index.rst are shown with
respect to the pin 1 markings on the BMD-3xx-EVAL boards, and are
flipped from the nRF52dk_nrf52832.
Tested with blinky, button, and Bluetooth peripheral_hr
Corrected type in index.rst (should be nRF52dk_nrf52832, not ..810)
Signed-off-by: Bob Recny <bob.recny@u-blox.com>
The GPIO drivers are initialized in the POST_KERNEL level with the
default priority, so whether they're available at the time the sysinit
function requires them depends on how the linker orders the init
records. Since we can't set a priority relative to the default
priority, hard-code the maximum priority and hope it's good enough.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>