1. All macros assert have been replaced with __ASSERT_NO_MSG.
2. Macro _Static_assert has been replaced with BUILD_ASSERT.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Several style and typo fixes in inline comments of arm kernel
files and thread.c.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
1. Added API to change shell prompt in runtime.
2. Added prompt buffer length configuration in Kconfig.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
So far the stack hasn't provided any way for the application to access
the existing bonds. This patch adds such an API.
Fixes#10122
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This adds a int return to recv callback which can be used to notify the
stack about errors when receiving a packet. In addition to that the user
can return -EINPROGRESS to inform the stack the data will be processed
asynchronously which can be complete by calling
bt_l2cap_chan_recv_complete.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Within a C++ file I include i2c.h and got 6 of the following errors:
zephyr/include/i2c.h:199:42: error: invalid conversion from
‘const void*’ to ‘const i2c_driver_api*’ [-fpermissive]
const struct i2c_driver_api *api = dev->driver_api;
~~~~~^~~~~~~~~~
I fixed it with a c style conversion for each instance, so
const struct i2c_driver_api *api = dev->driver_api;
becomes
const struct i2c_driver_api *api =
(const struct i2c_driver_api *)dev->driver_api;
I handled the instances for i2c_slave_driver_api alike.
I tested this with a one of my own boards and communication with a
I2C sensor.
Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
This allows to provide public address for controller without using
VS HCI command from host. Useful for controller only builds or
combined builds that are not using VS HCI commands.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The header should check if the macro _MPU_PRESENT is defined
and create it only if not defined.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
The size calculation for power of 2 MPUs were incorrect.
The calculation was not taking into account the amount of padding
the linker does when doing the required alignment. Hence the size
being calculated was completely incorrect.
With this patch the code now is optimized and the size of
partitions is now provided by the linker.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit removes all MPU-related (ARM_CORE_MPU and NXP_MPU)
options exept ARM_MPU, which becomes master switch controlling
MPU support on ARM.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
There are GPIO controllers that can control more than 32 pins.
The pin_mask is no longer adequate in this case. This wraps
the pin_mask in a union together with a field named 'pin'.
The driver is responsible for choosing whether to use
pin_mask or pin.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Added commands for getting current status and controlling which log
messages are forwared to available backends.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
New shell support features like:
- multi-instance
- command tree
- static and dynamic commands
- multiline
- help print function
- smart tab (autocompletion)
- meta-keys
- history, wildcards etc.
- generic transport (initially, uart present)
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add functionality for setting the host channel classification in
the controller using the HCI command.
This closes issue #9851
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This adds a function that will disable Bonding flag in
Authentication Requirements flag in SMP Pairing Request/Response.
This is needed for qualification purposes.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This will exclude testing Mesh related code from build if BT_MESH
option in Kconfig is not set.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit adds I2C_MSG_ADDR_10_BITS flag, while keeping
I2C_ADDR_10_BITS for backward compatibility.
I2C_ADDR_10_BITS flag should be removed as soon as all drivers
are modified to use message flag.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
Rename _DEVICE_STRUCT_SIZE to _DEVICE_STRUCT_SIZEOF. This causes it to
be picked by the script 'gen_offset_header.py' and inserted into the
header file 'include/generated/offsets.h'.
Renaming from x_SIZE to x_SIZEOF will align it's name with the other
symbols that denote a sctruct's size, like K_THREAD_SIZEOF.
Furthermore, it will allow the symbol to be accessed through a header
file define, instead of only as an extern symbol. This is more
flexible, and more aligned with the other symbols in offsets.
Finally, if we are able to move all of offsets.c symbols into the
offsets.h header file we be able to remove offsets.o from the link and
thereby simplify the linking process.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This allows to define shells which are using different syntax for
commands parsing eg. foocmd=param1,param2.
This is usefull for providing compatibility with existing external
tools while allowing to use Zephyr's shell subsystem.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
None of the data for the CEP, CUD and CPF descriptors needs to be
modified by the stack at runtime. Make it possible to pass constant
data to the descriptor macros, and make sure the descriptor handlers
cast the data back to be a constant.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There are some cases where atomic_and/or don't need to be
checked. Actively acknowledge these cases.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Some syscacll return value through parameters and for these functions
the return of _arch_syscall_invoke* are not used.
MISRA requires that all return values be checked.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The result of both printk and vprintk are not used in any place.
MISRA-C says that the return of every non void function must be
checked.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Module refactored: splitted data into read-only part and control block,
adding macro for creating log_output instance
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This changed added notification complete callback which
gives information if a given notification has been sent.
Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
Added implementation to the directed advertising API in the Connection
Management module. Introduced a new connection state for this type of
advertising. The new state is symmetric to the connection state used for
scanning.
Added a new advertising option that can be used to trigger low and high
duty directed advertising. Added macros for default values of
Advertising Parameters, which are used to trigger directed advertising.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Clean doxygen documentation and add _usb_device_controller_api group
to be added to the API documentation.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit moves the documentation corresponding to
_ARCH_THREAD_STACK_DEFINE(..) macro to the right place.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This patch enables BSD socket offload to a dedicated
TCP/IP offload engine.
This provides a simpler, more direct mechanism than going
through NET_OFFLOAD (zsock -> net_context -> socket conversions)
for those devices which provide complete TCP/IP offload at the
BSD socket level, and whose use cases do not require
IP routing between multiple network interfaces.
To use, configure CONFIG_NET_SOCKETS_OFFLOAD=y, and register
socket_offload_ops with this module.
Fixes#3706
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Provide an implementation of gettimeofday(). This uses clock_gettime()
with the CLOCK_REALTIME parameter, which is currently unimplemented, but
will allow clients to call this function once this functionality has
been implemented.
Signed-off-by: David Brown <david.brown@linaro.org>
*_ll_src/*_ll_dst/*_ll_swap/*_ll_if were not self explanatory, ll
meaning "link layer" it's ambiguous what the names meant.
Changing to:
*_lladdr_src/*_lladdr_dst/*_lladdr_swap/*_lladdr_if to fix this.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Even though the net_buf implementation may (and does currently)
internally use u16_t for lengths, keep the public facing API
consistent by using size_t.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>