1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
bors[bot] f0b60d5a0d
Merge #17091 #18148
17091: USBUS: Add URB support r=benpicco a=bergzand

### Contribution description

This commit adds support for URBs (USB Request/Response Blocks). These
allow for submitting multi-transfer sized buffers with USBUS handling
the individual usbdev xmits. Multiple URBs can be queued at once for a
single endpoint and USBUS will handle them in the order of submission.

OUT endpoint URBs must always consist of a whole number of full-sized
transfers (N x MaxEndpointSize). They will automatically finish after
the endpoint received a transfer less than the endpoint size.

IN endpoints can be arbitrary-sized and do not have to consist of a
whole number of full-sized transmissions. They support a flag to
indicate that the last transfer in the sequence must be less than a full
sized transfer (USBUS_URB_FLAG_AUTO_ZLP) and this adds a zero length
transfer at the end of the transmissions if the last transfer was equal
to the maximum transfer size.

URBs can be cancelled, but if the URB is already being processed it will
be cancelled after the current transmission within the URB is finished.
If it is still in the queue it will immediately be removed from the
queue.

### Testing procedure

- `tests/usbus_cdc_ecm` should still work. Testing one of the usbdev-supported platform should be sufficient here.

### Issues/PRs references

Needs #17064 


18148: sys/flash_utils: helpers to store data in flash r=benpicco a=maribu

### Contribution description

This helpers that allow storing, accessing, and working with data in flash that works for both classical Harvard architectures (which do not map flash also into the address space) as well as modern Harvard architectures and von-Neumann architectures.

With this, `examples/default` again runs on the Arduino Uno / Nano. Since this board is still the "entry kit" for many people to embedded hardware, it would be nice to support it with our default example.

### Testing procedure

`examples/default` should run and work on ATmega boards (especially ATmega328P and ATmega32U4 based boards) as well on all other boards now.

### Issues/PRs references

None

Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-27 11:57:20 +00:00
..
analog_util sys/analog_util/dac_util: fix truncation bug 2022-12-09 13:58:12 -05:00
app_metadata
arduino codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
auto_init Merge #18257 2023-02-13 21:09:07 +00:00
base64
benchmark sys/benchmark: fix divide by zero if runs < 1000 2022-02-08 12:52:48 +01:00
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
bitfield sys/bitfield: add bf_popcnt() 2022-11-10 23:44:50 +01:00
bloom
bus sys/bus: model Kconfig 2022-03-11 09:24:12 +01:00
can core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
cb_mux
checksum sys/checksum: add CRC-16 implementation without lookup table 2022-10-06 17:43:20 +02:00
chunked_ringbuffer sys/chunked_ringbuffer: model in Kconfig 2022-03-04 09:35:50 +01:00
clif sys/clif: Fixing out of bounds read under certain conditions 2023-02-23 15:45:03 +01:00
coding sys/coding: add XOR based coding module 2023-02-06 16:21:57 +01:00
color
congure congure_abe: initial import of TCP ABE congestion control 2022-10-17 16:44:39 +02:00
cpp11-compat sys/cpp11-compat: Fix kconfig model 2022-08-16 10:57:26 +02:00
cpp_new_delete sys: remove -std=c++11 2022-01-13 17:50:59 +01:00
crypto sys/crypto: make AES_KEY struct private 2023-02-20 18:22:00 +01:00
cxx_ctor_guards doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
debug_irq_disable cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div
ecc
eepreg
embunit
entropy_source
event sys/event: ensure that a queue has a waiter before waiting for flags 2022-04-14 17:10:24 +02:00
evtimer sys/evtimer: use now returned by set 2021-12-14 13:24:29 +01:00
fido2 fido2/ctap: uncrustify files 2022-09-23 16:42:52 +02:00
fmt Merge #19027 2023-02-17 20:09:53 +00:00
frac
fs vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
fuzzing fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
include Merge #17091 #18148 2023-02-27 11:57:20 +00:00
iolist sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
isrpipe sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
libc sys/string_utils: add strscpy() 2022-09-26 19:06:46 +02:00
log_color cpu/avr8_common: Wrap stdio.h 2023-02-27 12:31:03 +01:00
log_printfnoformat sys/log: modularize log into log_color and log_printfnoformat 2022-10-12 12:21:29 +02:00
luid
malloc_thread_safe sys/malloc_tracing: add module to trace dyn memory management 2022-11-15 12:59:46 +01:00
matstat
memarray
mineplex
net Merge #19119 #19313 2023-02-24 17:46:10 +00:00
newlib_syscalls_default cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
od sys/od/kconfig: add od_string 2022-03-11 09:20:24 +01:00
oneway-malloc
phydat sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
picolibc_syscalls_default sys/picolibc_syscalls_default: make stdin and stderr strong refs 2021-10-20 11:21:57 +02:00
pipe
pm_layered Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath" 2023-01-16 11:28:30 +01:00
posix treewide: fix typos found by recent codespell 2022-11-24 14:53:48 +01:00
preprocessor sys/preprocessor: add Kconfig file 2022-10-17 10:38:14 +02:00
progress_bar
ps schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
puf_sram sys/puf_sram: cleanup header 2022-12-05 16:13:21 +01:00
random random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
riotboot sys/riotboot: add tinyUSB DFU support 2023-01-15 18:09:55 +01:00
rtc_utils sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
rust_riotmodules rust_riotmodules: pub use instead of extern crate 2022-07-10 21:27:13 +02:00
rust_riotmodules_standalone rust: Update riot-sys and riot-wrappers 2023-02-20 09:06:33 +01:00
saul_reg drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
sema_inv
senml sys/phydat: Fix unit confusion 2023-02-23 16:44:24 +01:00
seq
shell drivers/saul: use flash_utils 2023-02-27 12:31:04 +01:00
shell_lock sys/shell_lock: do not call strlen, less jumpy 2023-01-16 21:11:58 +01:00
ssp
stdio_nimble core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_null Merge #18459 #18724 #19081 #19082 #19136 2023-01-13 13:50:55 +00:00
stdio_rtt sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
stdio_semihosting core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_uart core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
stdio_udp sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
suit sys/suit: Ensure previous thread is stopped before reusing its stack 2023-01-25 18:04:28 +01:00
test_utils sys/test_utils/print_stack_usage: reduce MIN_SIZE for fmt 2023-02-07 22:42:43 +01:00
timex
tiny_strerror sys/tiny_strerror: add missing error codes 2023-01-12 08:39:30 +01:00
trace treewide: make all modules use Kconfig ZTIMER_USEC indirection 2022-03-17 14:33:07 +01:00
trickle
tsrb sys/tsrb: add peek functions 2021-11-24 17:54:44 +01:00
universal_address
uri_parser sys/uri_parser: fixing potential out of bounds read when consuming ports 2022-12-05 15:41:33 +01:00
usb usbus/cdc_ecm: Make use of URBs for inbound frames 2023-02-27 10:09:55 +01:00
usb_board_reset sys/usb_board_reset: allow to enable it also for stdio_usb_serial_jtag 2023-02-06 16:19:11 +01:00
ut_process ut_process: add ; after DEBUG() 2021-12-09 11:20:44 +01:00
uuid
vfs Merge #18682 2023-02-25 18:59:07 +00:00
vfs_util sys/vfs_util: bugfix rec. delete, rel. components 2022-08-30 17:53:36 +02:00
xtimer sys/xtimer: switch default backend to ztimer 2022-03-18 08:23:00 +01:00
zptr
ztimer ztimer: introduce ztimer_mutex_unlock_after() 2023-01-13 00:08:55 +01:00
ztimer64 sys/ztimer64: properly clear timer on removal 2022-03-01 11:03:10 +01:00
doc.txt
Kconfig debug_irq_disable: add module to debug time spent in irq_disable 2022-11-24 21:27:20 +01:00
Kconfig.newlib sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
Kconfig.picolibc sys/libc: model Kconfig 2021-10-01 11:26:15 +02:00
Kconfig.stdio cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Makefile sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
Makefile.dep Merge #17091 #18148 2023-02-27 11:57:20 +00:00
Makefile.include sys: add tinyusb_dfu and riotboot_tinyusb_dfu to makefiles 2023-01-15 18:09:55 +01:00