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>
It is no longer necessary to set the KCONFIG_ROOT variable when the
KConfig file is in the application root directory.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Automatically detect the Kconfig file in it's conventional placement
${APPLICATION_SOURCE_DIR}/Kconfig and set KCONFIG_ROOT accordingly.
'Convention over configuration' is an imporant principle for
minimizing metadata and keeping things consistent. We use this
principle for instance with the file prj.conf.
This commit applies this principle to also re-direrct KCONFIG_ROOT.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Replaces direct accesses to the peripheral registers structure
with the proper SAADC HAL function that appeared recently in nrfx.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds new entries needed by nrfx in version 1.3.0 so that it is
properly adapted for being used in Zephyr.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Updates nrfx to the recently released version containing new drivers
for NFCT and USBD peripherals and enhanced SAADC HAL.
Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.3.0
commit: 67710e47c7313cc56a15748e485079831ee6a3af
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The apds9960 sensor driver recently added support for trigger mode, but
the gpio dts fixups weren't added to the build_all test. Adds the
missing dts fixups and updates the sensor trigger test to include the
apds9960 sensor driver.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
If the neighbour does not exists, then the route to it cannot
be deleted so we can return error to caller in that case.
Coverity-CID: 188173
Fixes#10090
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In net_route_add(), do not try to print route information if
route to neighbor is not found.
Coverity-CID: 188172
Fixes#10091
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If size or address cells happened to be 2 we'd get the wrong value since
we where shift the least significant 32-bit's up. Adjust the math based
on the value of the cell amount to fix things.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename address / size cell variable to clarify that its the number
of address / size cells.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
reg class is updated to take into account whole use cases
of reg extraction so extract_reg_prop could be removed.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Parameter 'names' is provided as argument of several property
extract functions. Thought it is actually used only once.
Remove when not needed.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch changes the behavior of the sensor. The sensor
will remain in sleep mode after initialization and will only
run the measurements once when sample_fetch is called.
This optimizes the power consumption of the sensor as it
stays in sleep mode most of the time.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Refactor and reorganize ALS and proximity setup functions.
Cleanup and reorder register, fix register fields.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
To improve the code coverage on native posix, adding CONFIG_SCHED_MULTIQ
for scheduler api tests.
Extracting a separate prj_native_posix.conf file for the scheduler test,
which validates the "multi queue" scheduler on native posix.
Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Use a lower slot duration than the used erase slot duration
to speed up the interval of write operations when in sync
with active Bluetooth connections.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
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>
Commit introduces support for ARM TrustZone CryptoCell 310
for Nordic Semiconductor nRF SoCs in device tree.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
This change aims at fixing 'unit_address_vs_reg' warning in
STM32 based boards.
This warning pops up when a node name is made up with an address
(node_name@xx) but does not contain a reg property.
This case was encountered for button nodes for instance,
where a reg property has no meaning.
Fix this by changing node_name@xx to node_name_xx which removes the
guilty '@XX' syntax but preserves node_name uniqueness.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add harness console and include regex for output
pattern matching to determine correctness of
sample execution.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
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 total number of loops being executed were taking far too long
to finish executing the test case. This was causing the timer handler
to execute in the middle of the test case. Thereby causing a test case
failure.
Now the number of loops have been reduced and this will make sure the
test case completes.
This change has no effect on the time being calculated by the
benchmark.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
The test case was supposed to access the privileged stack area
but instead it was accessing the stack guard region.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch updates the alignment for the memory domain partitions.
Also update the stack size for qemu_cortex_m3.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch will enable the MPU in MPS2_AN385 soc.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The code assumes that when the systick counter hits zero,
the timer interrupt will be taken before the loop can
read the LOAD/VAL registers, but this is not architecturally
guaranteed, and so the code can see a post-reload SysTick->VAL
and a pre-reload clock_accumulated_count, which causes it to
return an incorrectly small cycle count. By adding a ISB we
overcome this issue.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Added required files/support for the MPU in MPS2-AN358 (Cortex-M3).
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The lsm6dsl sensor driver incorrectly conditioned the interrupt pin
Kconfigs upon !HAS_DTS_SPI_PINS, when it should actually be
!HAS_DTS_GPIO_DEVICE.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds many missing sensor drivers and rebalances the testcases to
instantiate similar numbers of sensor drivers. Splits the sensor trigger
testcase into two due to having too many thread objects.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fixes casting warnings in multiple sensor drivers when creating their
own thread. These warnings were found when updating the build_all tests
to include missing sensor drivers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The bmm150 sensor driver was missed in the conversion from kbuild to
cmake. This problem was found when updating the build_all tests to
include missing sensor drivers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fixes a compiler format warning in the bmi160 sensor driver. This
warning was found when updating the build_all tests to include missing
sensor drivers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fixes unused variable warnings for the adxl362 and lis2dh sensor
drivers. These warnings were found when updating the build_all tests to
include missing sensor drivers.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>