If st7789_wrram is called with count = 1, then the entire buffer should
be sent. However, in 3 wire mode, the driver has to send the buffer
row by row because of additional data flag. The number of rows (count)
can't be ST7789_YRES in this case, but only the number of rows in
the buffer (this is write size / row size , where row size is
ST7789_XRES * ST7789_BYTESPP). This also applies only if we want to
write size larger than row size, because st7789_putrun allows to
write just a part of a row.
This fixes the incorrect behavior of the display in 3 wire mode if
the display is split into more buffer writes (as in LCD driver for
example, FB driver did not face this issue).
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Co-authored-by: Martin Krasula <krasula@atlas.cz>
This is required to meet the communication requirements as per the
LSM6DSO32 datasheet. It doesn't cause issues on some MCUs (RP2040), but
prevents successful reads on others (STM32).
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
If SPI dependency is not set, the following warning will be generated during compilation:
[109/1450] Building C object drivers/CMakeFiles/drivers.dir/rpmsg/rpmsg_port_spi.c.o
/data/code/nuttxspace/nuttx/drivers/rpmsg/rpmsg_port_spi.c: In function ‘rpmsg_port_spi_exchange’:
/data/code/nuttxspace/nuttx/drivers/rpmsg/rpmsg_port_spi.c:233:3: warning: implicit declaration of function ‘SPI_EXCHANGE’ [-Wimplicit-function-declaration]
233 | SPI_EXCHANGE(rpspi->spi, txhdr, rpspi->rxhdr,
| ^~~~~~~~~~~~
[1450/1450] Pac SIM with dynamic libs in nuttx.tgz
Signed-off-by: lijing.ly <lijing.ly@bytedance.com>
Spliting `THERMAL_NORMAL` to `THERMAL_ACTIVE` and `THERMAL_PASSIVE`,
to support different update intervals for thermal zone.
Active/Passive from [kernel.org](https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt):
* Cooling device nodes
Cooling devices are nodes providing control on power dissipation. There
are essentially two ways to provide control on power dissipation. First
is by means of regulating device performance, which is known as passive
cooling. A typical passive cooling is a CPU that has dynamic voltage and
frequency scaling (DVFS), and uses lower frequencies as cooling states.
Second is by means of activating devices in order to remove
the dissipated heat, which is known as active cooling, e.g. regulating
fan speeds. In both cases, cooling devices shall have a way to determine
the state of cooling in which the device is.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit add support to the serial_icounter_s struct used with
TIOCGICOUNT to report U[S]ART errors such as frame, parity, overrun,
etc.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
The valid addresses should be 0x6a and 0x6b, not 0x6c. Now the device
can be registered with the correct addresses without failing the
assertion.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Function w25qxxxjv_erase wasn't correctly handling an error in
w25qxxxjv_erase_sector call and was returning success even on failure.
Moreover this change does not immediately return EBUSY but waits for
the previous operation to finish. If the timeout is significant (more
than erase time of the entire flash), then it returns EBUSY.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Adds support for the LSM6DSO32 IMU by STM using the uORB framework. This
only contains limited support for the I2C interface, interrupt and
polling driven measurement and standard modes of operation (high
performance ODRs). Features like interrupts besides DRDY, filtering,
gesture recognition and acting as a bus master are not implemented.
For clearing some variables corresponding with the pollfds of the felip in can_close API, we modify poll logic by binding can_reader_s and pollfd.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
search the device tree and register cfi flash
test flowchart:
mount -t littlefs -o autoformat /dev/cfi-flash1 /data
fstest -m /data
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Realization of cfi-flash driver.
Add the interfaces of intel and amd command sets.
Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
fix build break:
ld: drivers/libdrivers.a(rptun_ivshmem.c.obj): in function `rptun_ivshmem_get_resource':
nuttx/drivers/rptun/rptun_ivshmem.c:215:(.text.rptun_ivshmem_get_resource+0xfc): undefined reference to `simple_addrenv_initialize'
ld: openamp/libmetal/lib/libmetal.a(io.c.obj): in function `metal_io_phys_to_offset_':
nuttx/openamp/libmetal/lib/system/nuttx/io.c:112:(.text.metal_io_phys_to_offset_+0xc): undefined reference to `up_addrenv_pa_to_va'
Signed-off-by: chao an <anchao.archer@bytedance.com>
There was a missing QSPI locking for w25qxxxjv_get_die_from_addr
function. We can't have the lock directly in w25qxxxjv_get_die_from_addr
because the function is called from already locked function
w25qxxxjv_erase_sector.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
UART RAM will have probabilistic bubble time during continuous transmission.
Update the offset after sending to avoid this problem.
Signed-off-by: chao an <anchao.archer@bytedance.com>
This forces the bch layer to read the sector from the physical device
instead of using the cached values. It is necessary to call when the
device is updated from the different source than bch, for example
erased by the MTD ioctl command.
It also has to invalidate readahead buffer from FTL if option
CONFIG_DRVR_READAHEAD is set.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
In file included from nuttx/drivers/rpmsg/rpmsg_port_uart.c:27:
nuttx/drivers/rpmsg/rpmsg_port_uart.c: In function ‘rpmsg_port_uart_send_connect_req’:
nuttx/drivers/rpmsg/rpmsg_port_uart.c:219:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
219 | rpmsgerr("Send connect request failed, ret=%d\n", ret);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| ssize_t {aka long int}
nuttx/drivers/rpmsg/rpmsg_port_uart.c:219:51: note: format string is defined here
219 | rpmsgerr("Send connect request failed, ret=%d\n", ret);
| ~^
| |
| int
| %ld
nuttx/drivers/rpmsg/rpmsg_port_uart.c: In function ‘rpmsg_port_uart_send_connect_ack’:
nuttx/drivers/rpmsg/rpmsg_port_uart.c:235:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
235 | rpmsgerr("Send connect ack failed, ret=%d\n", ret);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| ssize_t {aka long int}
nuttx/drivers/rpmsg/rpmsg_port_uart.c:235:47: note: format string is defined here
235 | rpmsgerr("Send connect ack failed, ret=%d\n", ret);
| ~^
| |
| int
| %ld
Signed-off-by: chao an <anchao.archer@bytedance.com>
just read the code, still have the deadlock after below change:
| commit 3b6f463ce2
| Author: chenrun1 <chenrun1@xiaomi.com>
| Date: Tue Dec 31 14:31:46 2024 +0800
|
| syslog_inbuffer:Fixed the lock reentry issue in single core + spinlock scenario
|
| Summary:
| When spinlock.h is enabled in a single-core scenario, spinlock reentry and exceptions may occur when spin_lock_irqsave_wo_note is used in syslog_add_intbuffer
|
| Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Signed-off-by: chao an <anchao.archer@bytedance.com>
Summary:
When spinlock.h is enabled in a single-core scenario, spinlock reentry and exceptions may occur when spin_lock_irqsave_wo_note is used in syslog_add_intbuffer
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Corrected CAN FD messages sending in character driver mode.
Assign CAN FD format flag in reception of CAN FD messages.
Corrected some defines mismatches.
The code has been tested in QEMU
qemu-system-x86_64 -m 2G -enable-kvm -smp 1 \
-cpu host,+pcid,+x2apic,+tsc-deadline,+xsave,+rdrand \
-kernel nuttx/nuttx \
-nographic -serial mon:stdio \
-object can-bus,id=canbus0-bus \
-object can-host-socketcan,if=can0,canbus=canbus0-bus,id=canbus0-socketcan \
-device ctucan_pci,canbus0=canbus0-bus,canbus1=canbus0-bus
The overall state of this third party CTU CAN FD driver in NuttX
is far from ideal. It would worth to consult and follow more
closely our Linux kernel driver and even better RTEMS CAN/CAN FD
stack design
https://canbus.pages.fel.cvut.cz/#cancan-fd-subsystem-and-drivers-for-rtems
Signed-off-by: Pavel Pisa <pisa@fel.cvut.cz>