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

104 Commits

Author SHA1 Message Date
Gunar Schorcht
09e94b3e15 sys/usb/usbus/dfu: check min sector size for STM32 F2/F4/F7
STM32F2/4/7 MCUs use sectors instead of pages, where the minimum sector size is defined by FLASHPAGE_MIN_SECTOR_SIZE, which is 16KB or 32KB (the first sector) depending on the CPU_MODEL. In this case SLOT0_OFFSET must be a multiple of the minimum sector size to cover a whole sector.
2022-11-30 19:28:14 +01:00
Ollrogge
0f9577df60 usbus/hid: fix buffer overflow in hid_io 2022-11-10 20:33:29 +01:00
Gunar Schorcht
5685718bcf sys/usb: enable common USB Kconfig for tinyUSB 2022-11-09 06:57:55 +01:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Benjamin Valentin
aef967fdef USBUS/cdc_ecm: register with netdev 2022-09-16 13:22:42 +02:00
Marian Buschsieweke
eaace28804
sys/usb: Set USB model to $(BOARD) by default 2022-08-29 16:39:05 +02:00
benpicco
c18c56aa03
Merge pull request #17380 from qmk/bind_extra_usb_config
usbus: Bind extra USB config
2022-01-09 17:58:38 +01:00
Gunar Schorcht
af621ec91b sys/usb/cdc/acm: implementation of stdio_available 2022-01-03 16:14:11 +01:00
zvecr
bf241a117c usbus: Bind extra USB config 2021-12-10 23:34:59 +00:00
Marian Buschsieweke
d571f150ec
sys/usb/usbus/dfu: use container_of() 2021-12-03 10:12:39 +01:00
Leandro Lanzieri
398df91a99
sys/usb/usbus: model cdc acm stdio in Kconfig 2021-11-26 11:06:47 +01:00
Ollrogge
6f9a21503b usbus/hid: fix ep_out readyness 2021-11-19 22:20:12 +01:00
dylad
f0a8bf9239 usbus/hid: fix ep_out readyness 2021-11-17 20:46:41 +01:00
Dylan Laduranty
aa8608eff5
Merge pull request #17064 from bergzand/pr/usbdev/xmit
USB: refactor to xmit-based API
2021-11-17 09:07:00 +01:00
Francisco
74cdb11bd1
Merge pull request #17203 from bergzand/pr/usbus/check_setup_length
usbus: check received setup request data amount
2021-11-17 08:59:07 +01:00
587d25a38e
USBUS/hid: Adapt to xmit API 2021-11-16 20:17:05 +01:00
5455c40c7a
USBUS/cdc_ecm: Adapt to xmit API 2021-11-16 20:17:04 +01:00
1a0bc3d8bc
USBUS/cdc_acm: Adapt to xmit API 2021-11-16 20:17:04 +01:00
7d9a177f25
USBUS: Adapt to xmit API
Converts the control endpoint to xmit API
2021-11-16 20:17:04 +01:00
4573d5f9dc
usbus_control: check received setup request data amount
This adds a check to the usbus control stack to ensure that the amount
of data received with a setup request does not exceed the amount
indicated within the setup request
2021-11-15 19:38:16 +01:00
2ba022221b
cdc_acm: Abort line coding request on incorrect size
This adds a sanity check to the line coding request of the CDC ACM code
to chcek the length parameter in the setup request with the size of the
expected payload struct
2021-11-15 19:36:03 +01:00
cd489cebd1
cdc_ecm: Truncate frames at max ethernet size
This truncates the incomming frames to ETHERNET_FRAME_LEN and silently
discards the rest of the frame until the end of the frame. This should
be modified to an endpoint halt condition after #17090 is merged, but
for now this should be good enough.

Stalling the endpoint with the current stall implementation could cause
a ping of death scenario, so for now the data is truncated until the
above solution can be implemented.
2021-11-15 16:04:13 +01:00
eaa007d412
Merge pull request #17135 from bergzand/pr/usbdev/fix_cppcheck_vera
usb(dev|bus): Fix static-check issues
2021-11-05 08:36:53 +01:00
9f510fb1ab
usbus/cdc_acm: resolve vera++ issues 2021-11-04 13:49:35 +01:00
86aa665cbc
usbus_hid: Fix possible null pointer dereference 2021-11-04 13:45:19 +01:00
Dylan Laduranty
64a82c9a78 usbus/dfu: fix underflow condition while updating firmware
Reports dfuERROR if underflow is detected or if flash write failed
Implement DFU control CLRSTATUS while at it to clear dfuERROR by the host
2021-11-03 17:06:27 +01:00
6a509308fe
usbus/cdc_acm: Return stall on line coding not supported
The SetLineCoding request is optional to support (CDC PSTN subclass). No
need to claim to support it to the host and actually discard the data if
it is not supported by the implementation.
2021-10-30 11:56:42 +02:00
5dfc4725c8
usbus_dfu: Use ztimer for reboot timeout 2021-10-26 14:14:46 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Jan Romann
415c6acc1a
usbus/hid: fix ENABLE_DEBUG definitions 2021-08-12 17:30:46 +02:00
Ollrogge
2c2eb88c0e usbus/hid: uncrustify files 2021-08-04 14:54:33 +02:00
Ollrogge
834ac3f5a5 usbus/hid_io: add missing header file, add RX callback function 2021-08-04 14:54:33 +02:00
Benjamin Valentin
cabe639d04 sys/riotboot: move magic address to common file 2021-07-20 22:51:15 +02:00
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