Add API for recovering an I2C bus. This API can be used to recover
from situations where the I2C master and one or more I2C slaves are
out of synchronization (e.g. if the I2C master was reset in the middle
of an I2C transaction or if a noise pulse was induced on the SCL
line).
Fixes#23441.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The '_' is not necessary, plus it makes the sys init object name
aligning with all others.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
init_fn is not anymore part of struct device, so let's test instead the
driver's API structure pointer which is also unique per device driver.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
device_api attribute is not at offset 4 but 8 now as name and
config_info has been directly imported into struct device.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
When the device driver model got introduced, there were no concept of
SYS_INIT() which can be seen as software service. These were introduced
afterwards and reusing the device infrastructure for simplicity.
However, it meant to allocate a bit too much for something that only
required an initialization function to be called at right time.
Thus refactoring the devices structures relevantly:
- introducing struct init_entry which is a generic init end-point
- struct deviceconfig is removed and struct device owns everything now.
- SYS_INIT() generates only a struct init_entry via calling
INIT_ENTRY_DEFINE()
- DEVICE_AND_API_INIT() generates a struct device and calls
INIT_ENTRY_DEFINE()
- init objects sections are in ROM
- device objects sections are in RAM (but will end up in ROM once they
will be 'constified')
It also generate a tiny memory gain on both ROM and RAM, which is nice.
Perhaps kernel/device.c could be renamed to something more relevant.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Clarify in the docs the importance of generating a key type that matches
the configuration used to sign JWT tokens.
Signed-off-by: David Brown <david.brown@linaro.org>
Add the template config values to the prj.conf. These will need to be
changed according to the instructions in the README.rts.
Signed-off-by: David Brown <david.brown@linaro.org>
The instructions on setting the necessary Kconfig values is unclear.
Add a description based on values that can be found in the Google IoT
Core console.
Signed-off-by: David Brown <david.brown@linaro.org>
Some wires were crossed when an older PR was merged that
had build conflicts with newer code. Update this header
to reflect were the 'nested' member is in the kernel CPU
struct.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
IS_EMPTY macro allows to check if defined name is empty, i.e.
does not contain replacement list.
LIST_DROP_EMPTY macro may be used to process __VA_ARGS__ type lists,
e.g. a,b,,c , and remove empty elements.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The label property does not need to have its type set
explicitly to string, so remove it.
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
We add a note in the Zephyr v2.3.0 release notes to highlight
a renaming in the Floating Point Services main Kconfig options,
which was done in the 2.3 release cycle.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Move syst initialization code to zephyr tree and add
more useful fields (payload length and timestamp) in
SyS-T message packet.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Add indication when sleep entry/exit counter do not match the test
expectations.
Measure deep sleep entry latency.
Add sleep entry/exit indication via gpios to debug.
Remove unnecessary trailing \n when using logging.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Before calling clock_gettime() 2 times in row, issue k_usleep(1)
to align code execution to timer interrupt to prevent (well,
minimize) possibility of getting different ticks values.
Suggested by @andyross.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Mostly trivial search-and-replace, except for pthread_rwlock.c, where
we need spread timeout over 2 semaphore operations.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Linux distro might not have a python3-dev package installed by default,
which will give an error during Python dependencies installation.
Closes#25128.
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@gmail.com>
With the new RI-2018.0 XCC, xt-gdb complains about not being able
to find register f0. Turns out that xt-gdb needs to be told which
file to look at (the file command) before a load command can be
issued. So swap these two commands in the load_elf.txt file.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit introduces backward compatibility with Zephyr SDK 0.11.1
and 0.11.2 so that users having one of those versions installed can
continue to use that version.
This remove the need to force users to update their SDK.
This is kept in independent commit to ensure it can easily be reverted
when minimum required Zephyr SDK is bumped to version 0.12.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit introduces Zephyr SDK CMake config package.
This removes the need for setting ZEPHYR_SDK_INSTALL_DIR and
ZEPHYR_TOOLCHAIN_VARIANT when using Zephyr SDK in Linux.
It also allows to introduces never SDKs without breaking Zephyr.
For example, with this PR, the current Zephyr SDK is 0.11.1 but when
releasing 0.12 then the current Zephyr will no longer built.
This PR moves the Zephyr SDK CMake related code to the SDK and thus
allowing to use newer SDKs, as long as they are backwards compatible.
It also allows multiple SDK installations, and will automatically select
the version closet to the required version.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit adds USB audio sample to the Zephyr project.
The sample configures one I/O device:
- Headset (2 channels, Fs=48kHz, PCM format)
Input data sstream is passed to output data stream.
For more details refer to README.rst.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds USB audio sample for Zephyr project.
The sample configures two devices:
- Microphone (2 channels, Fs=48kHz, PCM format)
- Headphones (2 channels, Fs=48kHz, PCM format)
Input data stream is passed to output data stream.
For more details refer to README.rst.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
By this commit USB audio class implementation is introduced
to Zephyr.
The Zephyr USB audio device class follows bellow
documentations:
- Universal Serial Bus specification rev2.0 (usb20.pdf)
- Universal Serial Bus Device Class Definition for Audio Devices
(audio10.pdf)
- Universal Serial Bus Device Class Definition for Audio Data Formats
(frmts10.pdf)
- Universal Serial Bus Device Class Definition for Terminal Types
(termt10.pdf)
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds support for receiveing data from ISO OUT endpoint
for NRF devices. NRF USB IP core does not generate IRQ when
data are received on ISO OUT endpoint and it must be synchronized
with SOF event.
Enable SOF handling by default if usb audio is configured
with NRF devices.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit adds enumeration type for isochronous
endpoints specific information required by USB Audio Class.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
By this commit exception for ISO endpoints is made when it comes
to its size. ISO endpoint buffer size for nrf devices is 1023 and
may be configured with variable length size. NRFX checks is size
is chosen accordingly and it is no reason to do it in SHIM.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Revise how the unusable memory area is treated.
Do not use SPI interface directly but ssd16xx_write_cmd().
This will allow a common SPI interface to be implemented
in the future.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>