[riot-notifications] [RIOT-OS/RIOT] USBUS: CDC ACM to UART functionality with example. (#12268)

Koen Zandberg notifications at github.com
Tue Sep 17 23:07:19 CEST 2019


### Contribution description

This PR adds integration for UART peripherals for the USBUS CDC ACM (serial over usb) functionality. It allows for transfering data over serial, configuring baud rate and parity bits of the UART peripheral from the host computer.

### Testing procedure

Run `examples/usbus_uart_adapter`. When attached to a host computer, it should provide multiple (depending on the board) ttyACM devices of which the first one is connected to the RIOT shell and the others are proxied to the UART peripherals on the board.

On a samr21-xpro, using `make list-ttys` this shows up as:
```
/sys/bus/usb/devices/3-9.2.3: RIOT-os.org USB device serial: '', tty(s): ttyACM3, ttyACM2, ttyACM4
```

In this case, `ttyACM3` is the *first* serial function and is connected to the RIOT shell.

### Issues/PRs references

Depends on #11085 
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/12268

-- Commit Summary --

  * usbus: Rework handling of set control requests
  * tests/usbus: Add automated test for usbus init
  * usb cdc acm: add common defines for cdc acm
  * usbus: Add cdc acm function
  * USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! usbus: Add cdc acm function
  * fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test
  * fixup! test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test
  * fixup! usb_cdc: Add common defines and message structs
  * fixup! fixup! usbus: Add cdc acm function
  * fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! fixup! usb_cdc: Add common defines and message structs
  * fixup! fixup! fixup! usbus: Add cdc acm function
  * fixup! fixup! fixup! usbus: Add cdc acm function
  * fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! test/usbus_cdc_acm_stdio: USB CDC ACM STDIO test
  * fixup! fixup! fixup! fixup! usbus: Add cdc acm function
  * fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! fixup! fixup! fixup! USBUS cdc acm: Add STDIO wrapper for CDC ACM
  * fixup! fixup! fixup! fixup! fixup! usbus: Add cdc acm function
  * cdc/acm: Add uart peripheral integration
  * examples/usbus: Add USB to UART multiplexer example

-- File Changes --

    M Makefile.dep (17)
    A examples/usbus_uart_adapter/Makefile (44)
    A examples/usbus_uart_adapter/README.md (23)
    A examples/usbus_uart_adapter/main.c (84)
    M makefiles/pseudomodules.inc.mk (2)
    M sys/auto_init/usb/auto_init_usb.c (8)
    M sys/include/usb/cdc.h (61)
    A sys/include/usb/usbus/cdc/acm.h (147)
    A sys/include/usb/usbus/cdc/acm_uart.h (81)
    M sys/include/usb/usbus/control.h (17)
    M sys/usb/usbus/Makefile (3)
    A sys/usb/usbus/cdc/acm/Makefile (10)
    A sys/usb/usbus/cdc/acm/cdc_acm.c (320)
    A sys/usb/usbus/cdc/acm/cdc_acm_stdio.c (124)
    A sys/usb/usbus/cdc/acm/cdc_acm_uart.c (166)
    M sys/usb/usbus/usbus_control.c (70)
    A tests/usbus/Makefile (22)
    A tests/usbus/main.c (349)
    A tests/usbus/usbdev_mock.c (225)
    A tests/usbus/usbdev_mock.h (108)
    A tests/usbus_cdc_acm_stdio/Makefile (22)
    A tests/usbus_cdc_acm_stdio/main.c (33)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/12268.patch
https://github.com/RIOT-OS/RIOT/pull/12268.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12268
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190917/9ed9358a/attachment.htm>


More information about the notifications mailing list