Set level high for unused interrupt trigger to avoid waking up from cold sleeping.
Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
Sim use coroutine base on one thread in host to do switch context. but if we allow switch context with in one API (host-API and errno get), maybe the switch context from coroutine cause re-enter host-API call. Make the errno get behavior not work as expected.
Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
This is a supplement to the patch:1936126210a56b6d1b033d6d940669413dd6e1b0
Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code.
So we have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize() with register_mtddriver().
According to a reference manual, VCC and VDD undervoltage
and VDD burst leads to the reset of all registers.
Therefore we have to reconfigure the expander to make
it functional again.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
1. -target should be in front, otherwise clang will not be able to find the corresponding libgcc.a
2. When using clang++ compiler to link, you also need to specify the corresponding arch, otherwise ld.lld will report an error due to arch mismatch.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
return early due to signal interruption (EINTR). This makes the
main thread think the async operation is done, but the background
worker thread is still running—risking access to freed memory,
race conditions, crashes or undefined behavior.
Using nxsem_wait_uninterruptible():the main thread waits until the
worker thread finishes, preventing these issues.
Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
Align the writing style of arm cmake, and each compiler defines its own find library
function, otherwise use the default
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Adds defconfig to support SDMMC over SPI for esp32c3-generic, esp32c6-devkitc,
esp32c6-devkitm and esp32h2-devkit.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
When the MMU is disabled (CONFIG_ARCH_USE_MMU=n) the
data passed back and forth with the TEE needs to be
synced from/to the cache, otherwise we get random data
in either world.
Fix this by cleaning before a call and invalidating after.
This has to be done both on the optee msg arg, and the shm
buffers therein. Cleaning and invalidating the page list
used to describe non-contiguous shm buffers did not seem
mandatory in my tests, but common sense says that it should
be, so we do that too.
This fix does not apply to the optee msg arg of the socket
transport (optee_socket.c), as that one _should_ be handled
by the socket send/recv methods. It does apply to all shm
buffers though, regardless of transport.
Signed-off-by: George Poulios <gpoulios@census-labs.com>
To save more space (equivalent to the size of one erase sector of
MTD device) and to achieve faster read and write speeds, a method
for direct writing was introduced at the FTL layer.
This can be accomplished simply by using the following oflags during
the open operation:
1. O_DIRECT. when this flag is passed in, ftl internally uses
the direct write strategy and no read cache is used in ftl;
otherwise, each write will be executed with the minimum
granularity of flash erase sector size which means a
"sector read back - erase sector - write sector" operation
is performed by using a read cache buffer in heap.
2. O_SYNC. When this flag is passed in, we assume that the
flash has been erased in advance and no erasure operation
will be performed internally within ftl. O_SYNC will take
effect only when both O_DIRECT and O_SYNC are passed in
simultaneously.
3. For uniformity, we remapped the mount flag in mount.h and
unified it with the open flag in fcntl.h. The repetitive
parts of their definitions were reused, and the remaining
part of the mount flag redefine to the unused bit of open
flags.
Signed-off-by: jingfei <jingfei@xiaomi.com>
This reverts commit 20fcdcf905f279a9c4527be399a90590f458db1f.
The reason is that the erase buffer isn't always used in most cases.
Signed-off-by: jingfei <jingfei@xiaomi.com>
We have adjusted the registration method for MTD devices
in nuttx/boards, replacing the previous approach using
ftl_initialize() and bchdev_register() with
register_mtddriver().
When registering MTD devices via register_mtddriver(),
FTL and BCH wrappers will be added during the open() process:
1. Character Device Mode:
When accessing the MTD device node via the open() interface,
the device will be automatically converted to a character
device. Both FTL and BCH wrappers will be implicitly added,
provided that BCH support is enabled in the configuration.
2. Block Device Mode:
When accessing the MTD device node via open_blockdriver(),
the device will be treated as a block device, with only
the FTL wrapper automatically applied.
Due to the automatic wrapping of MTD devices during the
open() process, the legacy registration methods
ftl_initialize() and bchdev_register() are no longer
required for MTD device registration for user code and should
be used only internally within fs and driver code.
Signed-off-by: jingfei <jingfei@xiaomi.com>
Updates the example documentation for a new example: local update agent.
This example allows the user to update MCUBoot image from a locally stored file.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit creates a sbutton device that uses a single button to
create a keyboard driver that returns TAB or ENTER depending how
long the user keeps the button pressed.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
In the toolchain, ARCH_TOOLCHAIN_XXX is used to select the compiler to be used. If clang is selected here, subsequent errors will occur
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Updates the ADS1115 documentation with information about the two new
commands for triggering conversion and reading the result.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Since the ADS1115 has a relative slow conversion rate, this additional
ioctl command makes it possible to trigger a conversion before reading
the reading the conversion result, allowing the user to perform other
computation in between instead of waiting for the conversion time to
complete. It improves sampling time.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>