This patch resolves to bugs in the GPIO interrupt logic:
1. Any pins did not have STMPE811_GPIO_RISING in their pincfg
would clear the rising edge interrupt enable flag for all
pins due to a masking bug.
2. Pins would never trigger a second interrupt. There is an
undocumented requirement that you have to clear both the
GPIO interrupt status register __and__ also the edge
detection status register. Failure to clear either of
these will result in no further interrupts being triggered.
This requirement exists both for edge and level modes of
operation.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Summary:
- This commit applies NET_LL_IEEE80211 to gs2200m.c
- Also selects DRIVERS_IEEE80211 in Kconfig
Impact:
- Affects use cases with gs2200m driver
Testing:
- Tested with spresense:wifi and spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The WS2812 is very common in LED strips as it is an integrated
controller and LED. It is driven by a single data line, but
the timing requirements can be met by using most SPI controllers
and the use of DMA.
This driver has been validated on the nRF52 arch both with a
single LED and a strip of 144.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Summary:
- This commit fixes warnings when we remove noreturn from _assert()
Impact:
- Should have no impact
Testing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
The Multiblock write path was missing the
the SDIO_WAITENABLE with SDIOWAIT_WRCOMPLETE.
This could be seen with debugging turned on as
mmcsd_eventwait: ERROR: Awakened with 10
mmcsd_transferready: ERROR: mmcsd_eventwait for transfer ready failed: -5
If the buffer to be flushed isn't multipled by the erase size,
let's pad the buffer proactively to avoid the allocation in ftl.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6d7904aafab93a7886a594319d65826b81cd3cd1
3Change-Id: I88276149cc7826e7416929ca60b06314e96079a6
Summary:
- Remove unnecessay code from gs2200m_irq()
- Fix irq control in case that work_available() returns false
Impact:
- All use cases with gs2200m driver
Testing:
- Tested with spresense:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
When CONFIG_MMCSD_MULTIBLOCK_DISABLE is lit, all SD
read/write failed. The function return the number of
blocks in `ret`, set on entry to nsectors. That was
then wiped out by using the ret for the mmcsd_takesem.
Since the code had many path setting return, the choices for
the fix could have been add a new varaible or simple init it
were used. I choose the latter.
flush the dirty sector to keep the sector sequence before ftl write
Change-Id: I1096cce39965806d5c877c2929b5a2ecdab27ac9
Signed-off-by: chao.an <anchao@xiaomi.com>
Fixes:
##[error]net/tun.c:837:13: error: conflicting types for 'tun_poll_expiry'
837 | static void tun_poll_expiry(FAR void *arg)
| ^~~~~~~~~~~~~~~
net/tun.c:196:13: note: previous declaration of 'tun_poll_expiry' was here
196 | static void tun_poll_expiry(wdparm_t arg);
| ^~~~~~~~~~~~~~~
And
##[error]net/tun.c:881:57: error: passing argument 4 of 'wd_start' makes integer from pointer without a cast [-Werror=int-conversion]
881 | wd_start(&priv->txpoll, TUN_WDDELAY, tun_poll_expiry, priv);
| ^~~~
| |
| struct tun_device_s *
In file included from /github/workspace/sources/nuttx/include/nuttx/sched.h:41,
from /github/workspace/sources/nuttx/include/sched.h:34,
from /github/workspace/sources/nuttx/include/nuttx/arch.h:81,
from net/tun.c:60:
/github/workspace/sources/nuttx/include/nuttx/wdog.h:134:42: note: expected 'wdparm_t' {aka 'long unsigned int'} but argument is of type 'struct tun_device_s *'
134 | wdentry_t wdentry, wdparm_t arg);
| ~~~~~~~~~^~~
And
chip/cxd56_rtc.c: In function 'up_rtc_initialize':
##[error]chip/cxd56_rtc.c:358:3: error: too many arguments to function 'cxd56_rtc_initialize'
358 | cxd56_rtc_initialize(1, NULL);
| ^~~~~~~~~~~~~~~~~~~~
chip/cxd56_rtc.c:253:13: note: declared here
253 | static void cxd56_rtc_initialize(wdparm_t arg)
| ^~~~~~~~~~~~~~~~~~~~
sam_ili9488.c:1605:7: error: label 'errout_with_dmadog' used but not defined
bcmf_sdio.c:855:16: error: passing argument 1 of 'wd_start' from incompatible pointer type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
to save the preserved space(1KB) and also avoid the heap overhead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
Summary:
- This commit is a workaround to avoid errors in gs2200m_send_cmd()
- See the actual sequence in Testing for details
Impact:
- gs2200m driver
Testing:
- Test with spresense:wifi
- 1-1 Run tcpclient on NuttX and run nc on Linux
- 1-2 Stop nc on Linux then tcpclient also stops
- 1-3 Run tcpclient then the first AT+NCTCP will fail
- 1-4 But the second AT+NCTCP will succeed
- 2-1 Run tcpclient on NuttX and run nc on Linux
- 2-2 Stop nc on Linux then tcpclient also stops
- 2-3 Run tcpserver then the first AT+NSTCP will fail
- 2-4 But the second AT+NSTCP will succeed
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
1.Expose the notification through fb_vtable_s::updatearea
2.Incorporate old nx_notify_rectangle into the new updatearea callback
3.Migrate the calle of nx_notify_rectangle to fb_vtable_s::updatearea
Change-Id: Ia3d1f73e8757b2d381586d76ec6adc16c810018d
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Change default value for RNDIS_NWRREQS based on NET_TCP_WRITE_BUFFERS
Impact:
- This commit affects RNDIS use cases
Testing:
- spresense:rndis with CONFIG_NET_TCP_WRITE_BUFFERS=y
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
drivers/net/ftmac100.c, libs/libc/stdlib/lib_aligned_alloc.c
A continuation of PRs #1507, #1510, and #1512. See Issue #1481 for additional information.
malloc() and free() should never be used within the OS. This will work in the FLAT build because there is only a single heap, but will cause problems in PROTECTED and KERNEL build modes where there are separate heaps for user and kernel memory.
Typically kmm_malloc(), kmm_zalloc(), and kmm_free() should be called within the kernel in those build modes to use the kernel heap.
Memory is never free. Possible memory leak:
./boards/arm/cxd56xx/common/src/cxd56_crashdump.c: pdump = malloc(sizeof(fullcontext_t));
Memory allocated with malloc(), but freed with kmm_free():
./drivers/usbhost/usbhost_composite.c: cfgbuffer = (FAR uint8_t *)malloc(CUSTOM_CONFIG_BUFSIZE);
Memory is never freed in these cases. It is allocated in the driver initialization logic, but there is no corresponding uninitialization logic; memory is not freed on error conditions:
./arch/arm/src/lc823450/lc823450_i2s.c: priv = (struct lc823450_i2s_s *)zalloc(sizeof(struct lc823450_i2s_s));
./arch/arm/src/sam34/sam_spi.c: spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s));
./arch/arm/src/sama5/sam_spi.c: spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s));
./arch/arm/src/samv7/sam_spi.c: spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s));
Memory is allocated with zalloc() but freed on error conditions with kmm_free():
./arch/arm/src/sama5/sam_ssc.c: priv = (struct sam_ssc_s *)zalloc(sizeof(struct sam_ssc_s));
./arch/arm/src/samv7/sam_ssc.c: priv = (struct sam_ssc_s *)zalloc(sizeof(struct sam_ssc_s));
./arch/arm/src/stm32/stm32_i2s.c: priv = (struct stm32_i2s_s *)zalloc(sizeof(struct stm32_i2s_s));
Memory is never freed:
./drivers/spi/spi_bitbang.c: priv = (FAR struct spi_bitbang_s *)zalloc(sizeof(struct spi_bitbang_s));
arch/arm/src/cxd56xx/cxd56_gnss.c, arch/arm/src/xmc4/xmc4_spi.c,
crypto/blake2s.c, drivers/lcd/pcf8574_lcd_backpack.c, drivers/lcd/st7032.c
User space memory should not be used within the OS and, when it is absolutely necessary to use user-space memory, it should be allocated using kumm_malloc().
drivers/net/telnet.c
drivers/wireless/bluetooth/bt_uart_bcm4343x.c
drivers/wireless/ieee802154/mrf24j40/mrf24j40.c
Kernel memory was allocated using kmm_malloc() or kmm_zalloc() but freed with with the user-space allocator free(). In the FLAT build, this is bad style, but not harmful because there is only a single, heap and malloc() and kmm_malloc() map to the same function.
But that is not true in the case of the PROTECTED or KERNEL builds. In those cases, there are separate heaps. kmm_malloc() will allocate from the kernel heap. free() will attempt to free the kernel memory from the user heap and will cause an assertion (or other obscure failure if assertions are disabled).
Found by clang-check:
usbhost/hid_parser.c:278:26: warning: Assigned value is garbage or undefined
usage[i] = usage[i + 1];
^ ~~~~~~~~~~~~
usbhost/hid_parser.c:321:34: warning: Assigned value is garbage or undefined
usage[i] = usage[i + 1];
^ ~~~~~~~~~~~~
2 warnings generated.