[riot-notifications] [RIOT-OS/RIOT] usbus: Add CDC-ACM (Serial console) function (#11085)

Koen Zandberg notifications at github.com
Thu Feb 28 21:51:09 CET 2019


### Contribution description

This PR extends the USBUS stack with RIOT serial console over USB. 

Output from `stdio_write` is buffered until a host opens the serial device. This can be configured with `USBUS_CDCACM_BUFFER_FOR_DTE`. In practice this means that no output produced by `stdio_write` is discarded.

### Testing procedure

Add `USEMODULE += stdio_cdc_acm` to a project.

### Issues/PRs references

depends on #11075

![image](https://bergzand.net/misc/usbus.dot.svg)

### Todo

Prevent hangs when the `tsrb` is full
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * usb: Add defines for USB peripheral devices
  * usbopt: Add usb control operation enum
  * usbdev: Introduce a common API for USB peripherals
  * fixup! usbdev: Introduce a common API for USB peripherals
  * fixup! usbopt: Add usb control operation enum
  * fixup! usbdev: Introduce a common API for USB peripherals
  * usbdev: add configurables for usb device drivers
  * fixup! usbopt: Add usb control operation enum
  * fixup! fixup! usbdev: Introduce a common API for USB peripherals
  * fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals
  * drivers: Add usb device group
  * fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals
  * fixup! fixup! usbopt: Add usb control operation enum
  * fixup! usb: Add defines for USB peripheral devices
  * fixup! fixup! fixup! usbopt: Add usb control operation enum
  * fixup! fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals
  * fixup! fixup! fixup! fixup! fixup! fixup! usbdev: Introduce a common API for USB peripherals
  * fixup! fixup! usb: Add defines for USB peripheral devices
  * fixup! fixup! fixup! fixup! usbopt: Add usb control operation enum
  * sam0_common: Add USB peripheral driver
  * samr21-xpro: Enable USB driver when required
  * fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! sam0_common: Add USB peripheral driver
  * usb: Add generic USB structs and functions
  * usbus: Initial work to a unified USB stack
  * USBUS: add minimal working example
  * fixup! USBUS: add minimal working example
  * fixup! usbus: Initial work to a unified USB stack
  * fixup! usb: Add generic USB structs and functions
  * fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! USBUS: add minimal working example
  * fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! usb: Add generic USB structs and functions
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! usbus: Initial work to a unified USB stack
  * auto_init_usb: initial implementation
  * usbus_minimal: Adapt example to auto_init
  * usb_cdc: Add common defines and message structs
  * usb cdc acm: add common defines for cdc acm
  * usbus: Add cdc acm function
  * USBUS cdc acm: Add STDIO wrapper for CDC ACM

-- File Changes --

    M Makefile.dep (17)
    M boards/samr21-xpro/Makefile.dep (4)
    M cpu/sam0_common/Makefile (4)
    A cpu/sam0_common/include/sam_usb.h (71)
    A cpu/sam0_common/usb/Makefile (3)
    A cpu/sam0_common/usb/usb.c (695)
    M drivers/doc.txt (6)
    A drivers/include/usb/usbdev.h (560)
    A examples/usbus_minimal/Makefile (24)
    A examples/usbus_minimal/main.c (41)
    M makefiles/pseudomodules.inc.mk (2)
    M sys/Makefile (3)
    M sys/auto_init/Makefile (4)
    M sys/auto_init/auto_init.c (6)
    A sys/auto_init/usb/Makefile (3)
    A sys/auto_init/usb/auto_init_sam0.c (31)
    A sys/auto_init/usb/auto_init_usb.c (63)
    A sys/include/usb.h (134)
    A sys/include/usb/cdc.h (98)
    A sys/include/usb/cdc/acm.h (28)
    A sys/include/usb/descriptor.h (221)
    A sys/include/usb/usbopt.h (122)
    A sys/include/usb/usbus.h (515)
    A sys/include/usb/usbus/cdc/acm.h (71)
    A sys/include/usb/usbus/fmt.h (45)
    A sys/usb/usbus/Makefile (4)
    A sys/usb/usbus/cdc/acm/Makefile (7)
    A sys/usb/usbus/cdc/acm/cdc_acm.c (327)
    A sys/usb/usbus/cdc/acm/cdc_acm_stdio.c (127)
    A sys/usb/usbus/usbus.c (318)
    A sys/usb/usbus/usbus_control.c (444)
    A sys/usb/usbus/usbus_fmt.c (242)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11085.patch
https://github.com/RIOT-OS/RIOT/pull/11085.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/11085
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190228/df00f051/attachment.html>


More information about the notifications mailing list