USB CDCACM can send and recevie in interrupt routine
Summary
- Delete CDCACM redundant code and shares apis in the serial port.
- The existing cdcacm does not support sending and receiving data in interrupt, by adding void (*poll)(FAR struct usbdev_ep_s *ep) to the usb interface to support sending and receiving data in polling mode in interrupt, while changing the normal sending and receiving to use dma interface.
- Because the data sent and received is multi-byte, the corresponding APIs in serial is modified synchronously.
Impact
Two APIs, named uart_recvbuf and uart_sendbuf, are added to the struct uart_ops_s. One API, named poll, is added to the struct usbdev_epops_s . CDCACM uses the dma interface in struct uart_ops_s for sending and receiving. In interrupt, CDCACM sends data by using cdcuart_txready, cdcuart_sendbuf, cdcuart_txempty. In interrupt, CDCACM receives data by using cdcuart_rxavailable, cdcuart_recvbuf.
Testing
Test normal serial and cdcacm sending and receiving After the crash, in interrupt routine, use gdbstub to test the sending and receiving of cdcacm and serial.
[Experimental Bot, please feedback here]
I need the content of the actual PR to assess if it meets the NuttX requirements. Please provide the following:
- Link to the PR: This will allow me to see the proposed changes, commit messages, and any discussion within the PR.
- Description of the changes: A brief overview of what the PR aims to achieve.
With this information, I can effectively determine if the PR meets the NuttX requirements.