mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
usbhost/cdcacm: Fix the compiler warning when serial dma is enabled
CP: nuttx/nuttx/include/nuttx/config.h
CC: mqueue/mq_sndinternal.c usbhost/usbhost_cdcacm.c:435:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘void (*)(struct uart_dev_s *, _Bool)’ [-Wincompatible-pointer-types]
435 | usbhost_txint, /* txinit */
| ^~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:435:3: note: (near initialization for ‘g_uart_ops.dmareceive’)
usbhost/usbhost_cdcacm.c:436:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
436 | usbhost_txready, /* txready */
| ^~~~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:436:3: note: (near initialization for ‘g_uart_ops.dmarxfree’)
usbhost/usbhost_cdcacm.c:437:3: warning: initialization of ‘void (*)(struct uart_dev_s *)’ from incompatible pointer type ‘_Bool (*)(struct uart_dev_s *)’ [-Wincompatible-pointer-types]
437 | usbhost_txempty /* txempty */
| ^~~~~~~~~~~~~~~
usbhost/usbhost_cdcacm.c:437:3: note: (near initialization for ‘g_uart_ops.dmatxavail’)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Mateusz Szafoni
parent
961a68b4cf
commit
694c0f0b7f
@@ -425,11 +425,21 @@ static const struct uart_ops_s g_uart_ops =
|
||||
usbhost_attach, /* attach */
|
||||
usbhost_detach, /* detach */
|
||||
usbhost_ioctl, /* ioctl */
|
||||
NULL , /* receive */
|
||||
NULL, /* receive */
|
||||
usbhost_rxint, /* rxinit */
|
||||
usbhost_rxavailable, /* rxavailable */
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||
usbhost_rxflowcontrol, /* rxflowcontrol */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_TXDMA
|
||||
NULL, /* dmasend */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_RXDMA
|
||||
NULL, /* dmareceive */
|
||||
NULL, /* dmarxfree */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_TXDMA
|
||||
NULL, /* dmatxavail */
|
||||
#endif
|
||||
NULL, /* send */
|
||||
usbhost_txint, /* txinit */
|
||||
|
||||
Reference in New Issue
Block a user