1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Antonio Galea
9c9056844e USB CDC: fix typo in definitions 2021-02-22 14:56:37 +01:00
dylad
25d0dffa61 Kconfig: add Kconfig support for DFU 2021-01-12 11:34:22 +01:00
dylad
669a8ec7b3 usbus/dfu: introduce initial Device Firmware Upgrade support for USBUS 2021-01-12 11:34:22 +01:00
Dylan Laduranty
916f554d2a
Merge pull request #14629 from Ollrogge/usb_hid_pr
USB HID minimal implementation
2021-01-11 20:17:52 +01:00
Build Bot
122d7a0f35 usbus/hid: add minimal implementation 2021-01-11 00:24:30 +01:00
a57b88d6cc
usbus: Use atomic_utils for endpoint flag operations 2021-01-10 11:40:23 +01:00
9cd753228c
usbus: Add USB peripheral serial string support 2020-12-17 11:37:05 +01:00
185bf28c21
usb: Add configuration options for USB peripheral serial
This adds compile-time options to configure the serial of an USB
peripheral. The serial be autogenerated with a configured number of
bytes. It is also possible to configure a fixed serial string for a
device and disable the autogeneration of the serial.
2020-12-17 11:37:04 +01:00
1eb30f1cd7
Merge pull request #15566 from dylad/pr/usbus/string_descr_for_alt_if
usbus: add optional string descriptor for alt interface
2020-12-09 14:52:40 +01:00
dylad
4b438c2cc0 usb/cdc_ecm: use add_interface_alt helper function 2020-12-09 09:38:15 +01:00
dylad
7b8feef326 usbus: add usbus_add_interface_alt helper function 2020-12-09 09:38:15 +01:00
dylad
dde5e94233 usbus: add optional string descriptor for alt interface 2020-12-08 15:39:14 +01:00
57e79d6c24 all: add missing sys/types.h includes 2020-11-25 17:52:34 +01:00
Bas Stottelaar
1b35d06a51 sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
Bas Stottelaar
80d9da90df sys/*: add missing include of assert.h 2020-10-22 11:13:09 +02:00
70d480c301 sys/usb/usbus/cdc_ecm_netdev: fix _recv() return values
Previously, the function would always return the max_len parameter.
This poses two issues:

1. the API requires to return the actual packet size
2. the API requires that if the packet is larger than max_len, the
   packet is flushed and -ENOBUFS is returned
3. this basically bypasses the packet flushing, consequtive _recv()
   would return the last packet again

This commit fixes those issues.
2020-09-18 21:04:15 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:

1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
   functions
2020-08-24 20:28:11 +02:00
e8d8fd2f32
Merge pull request #14404 from benpicco/sys/usb_board_reset_in_bootloader
sys/usb_board_reset: add usb_board_reset_in_bootloader definition
2020-07-01 13:49:59 +02:00
chrysn
a787875cf8 usb_board_reset: Split headers into public and private
The private parts need USB definitions (and are thus preferably used
from USB_H_USER_IS_RIOT_INTERNAL compilation units). Functions like
usb_board_reset_in_bootloader do not depend on USB headers for their
definitions and are fair game throughout the application even for
generic RIOT USB devices.
2020-07-01 13:22:25 +02:00
chrysn
85d7042732 usb Kconfig: Provide explicit defaults
See-Also: https://github.com/RIOT-OS/RIOT/pull/13382#discussion_r380506106
2020-06-30 10:51:42 +02:00
chrysn
fbd7b66f33 usb Kconfig: Remove conditional
The clause was left over from moving the lines into the main
configuration from an example config without understanding its
relevance.
2020-06-30 10:51:41 +02:00
chrysn
250f6fdfa3 usb: Warn on test-ID usage in a unified location
This

* renames DEFAULT_xID to USB_xID_TESTING as it is not really a default
  (if anyting, the 7D00 is, and it's not that)
* moves the check into Makefile
* generalizes the check to all test PID/VID pairs
  * in doing so, fixes the "or" (which would have ruled out warning-free
    use of an allocated pid.codes number), and compares to the actual
    testing PID rather than the RIOT-peripheral PID
* removes all occurrences of duplicated checks in examples or tests,
  leaving definitions only where they are needed
* moves the Kconfig defaults of the usbus_minimal example into the main
  Kconfig, as these are good defaults for all cases when USB is enabled
  manually

Closes: https://github.com/RIOT-OS/RIOT/issues/12273
2020-06-30 10:51:36 +02:00
Kees Bakker
173098db9e usbus/cdc/acm: correct return expression of stdio_write
This resolves issue #14184
2020-06-07 11:53:19 +02:00
Leandro Lanzieri
dddeb54e7d
usbus/cdc/ecm: Expose configurations to Kconfig 2020-04-08 16:31:46 +02:00
Leandro Lanzieri
335b0ceb50
usbus/cdc/ecm: Move USBUS_CDC_ECM_CONFIG_SPEED_UPSTREAM to 'CONFIG_' 2020-04-08 16:27:04 +02:00
Leandro Lanzieri
88e50658f3
usbus/cdc/ecm: Move USBUS_CDC_ECM_CONFIG_SPEED_DOWNSTREAM to 'CONFIG_' 2020-04-08 16:24:59 +02:00
Leandro Lanzieri
934bede70e
usbus/cdc/acm: Expose configurations to Kconfig 2020-04-07 14:34:57 +02:00
Leandro Lanzieri
51c4f119a5
usbus/cdc/acm: Move USBUS_CDC_ACM_BULK_EP_SIZE to 'CONFIG_' namespace 2020-04-07 14:34:56 +02:00
Leandro Lanzieri
cd3ac726d9
usbus/cdc/acm: Move USBUS_CDC_ACM_STDIO_BUF_SIZE to 'CONFIG_' namespace 2020-04-07 14:34:52 +02:00
Leandro Lanzieri
06920a1f7a
sys/usbus: Expose configurations to Kconfig 2020-04-03 14:45:27 +02:00
Leandro Lanzieri
4d47921947
sys/usbus: Move USBUS_EP0_SIZE to 'CONFIG_' namespace 2020-04-03 14:45:26 +02:00
Leandro Lanzieri
7bd5f86bdd
sys/usbus: Move USBUS_AUTO_ATTACH to 'CONFIG_' namespace
In code now 'IS_ACTIVE' is used to check for this configuration.
2020-04-03 14:45:25 +02:00
95bf34ee9c
makefiles: sys/cdc-acm-stdio: provide a reset in bootloader hook 2020-03-18 10:43:05 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
chrysn
e65f3f372b USB VID/PID: Set whitelist define for internals that use usb.h
This list is probably incomplete as it was created experimentally.
2020-01-30 15:04:10 +01:00
5fd981b2e2
Merge pull request #12402 from ant9000/pr/usbus_cdc_acm_stdio_fix
Fix to avoid lost characters on USBUS CDC ACM STDIO
2020-01-15 19:52:13 +01:00
Antonio Galea
6c04cb1a45 USBUS CDC ACM: disable interrupts when using tsrb 2020-01-15 11:37:38 +01:00
Leandro Lanzieri
a1836d36a4 Kconfig: Expose USB peripheral configurations 2020-01-14 10:34:53 +01:00
Leandro Lanzieri
15bd4897c1 usb: Move configuration macros to 'CONFIG_' namespace
Macros that changed:
USB_CONFIG_VID -> CONFIG_USB_VID
USB_CONFIG_PID -> CONFIG_USB_PID
USB_CONFIG_MANUF_STR -> CONFIG_USB_MANUF_STR
USB_CONFIG_PRODUCT_STR -> CONFIG_USB_PRODUCT_STR
USB_CONFIG_CONFIGURATION_STR -> CONFIG_USB_CONFIGURATION_STR
USB_CONFIG_PRODUCT_BCDVERSION -> CONFIG_USB_PRODUCT_BCDVERSION
USB_CONFIG_SPEC_BCDVERSION -> CONFIG_USB_SPEC_BCDVERSION
USB_CONFIG_SELF_POWERED -> CONFIG_USB_SELF_POWERED
USB_CONFIG_MAX_POWER -> CONFIG_USB_MAX_POWER
USB_CONFIG_DEFAULT_LANGID -> CONFIG_USB_DEFAULT_LANGID
2020-01-14 10:34:53 +01:00
benpicco
f71f45bd96
Merge pull request #12892 from bergzand/pr/usbus_fmt/missing_alt_len_increment
usbus_fmt: Add missing alt iface size increase
2019-12-06 16:36:53 +01:00
1a6209a8fe
usbus_fmt: Add missing alt iface size increase
The configuration length verification was not taking additional alt
interface descriptors into account. This breaks situations where an alt
interface is used such as is the case with CDC ECM
2019-12-06 14:28:32 +01:00
benpicco
b77ff84d9e
Merge pull request #12676 from ant9000/pr/usbus_cdc_ecm-mac_host-fix
USBUS CDC ECM: host and MCU mac addresses should differ
2019-12-05 18:53:10 +01:00
cd25e1c011 usbus_fmt: assert descr len matches claimed len
This commit adds runtime assertions to validate that the total length of
the configuration descriptor as communicated to the host device matches the
generated length of the configuration descriptor.
2019-12-03 15:07:42 +01:00
benpicco
341d23dded
Merge pull request #12504 from bergzand/pr/usbus/descr_terminology
usbus: Unify terminology to use 'descriptor' everywhere
2019-11-12 11:41:10 +01:00
3db4678384
usbus: Unify terminology to use 'descriptor' everywhere 2019-11-12 10:29:19 +01:00
Antonio Galea
f7be559df3 USBUS CDC ECM: host and MCU mac addresses should differ 2019-11-08 15:40:55 +01:00
benpicco
acaaee910e
Merge pull request #12536 from bergzand/pr/usbus/cdcacm_activate_on_dte_present
cdcacm: Activate data out endpoint on DTE present signal
2019-10-29 13:03:39 +01:00
1d7032a257
cdcacm: Activate data out endpoint on DTE present signal 2019-10-29 08:45:31 +01:00
727263ce73
Merge pull request #12533 from bergzand/pr/usbus/cdcecm_ready_on_iface
cdcecm: only activate OUT endpoint after interface selection
2019-10-29 07:55:35 +01:00