1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include
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
..
bhp sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
can drivers/mcp2515: apply the filter to a target mailbox 2022-06-30 10:07:24 +02:00
checksum sys/checksum: update CRC-16 documentation 2022-10-07 13:01:38 +02:00
coding sys/coding: add XOR based coding module 2023-02-06 16:21:57 +01:00
congure congure_abe: initial import of TCP ABE congestion control 2022-10-17 16:44:39 +02:00
cppunit core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
crypto sys/crypto: make AES_KEY struct private 2023-02-20 18:22:00 +01:00
ecc doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
embUnit sys/embUnit: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
entropy_source sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event sys/event: add event sources 2023-01-19 13:05:15 +01:00
fido2 fido2/ctap: uncrustify files 2022-09-23 16:42:52 +02:00
fs pkg/lwext4: add lwEXT4 2023-02-25 14:01:20 +01:00
hashes sys/hash/pbkdf2: Accept passwd as void * instead of uint8_t * 2022-11-18 13:51:32 +01:00
isrpipe
net Merge #19299 #19301 2023-02-22 15:50:59 +00:00
riotboot sys/riotboot: use BTN0_MODE for default value of BTN_BOOTLOADER_INVERTED 2022-11-30 19:28:14 +01:00
senml sys/phydat: Fix unit confusion 2023-02-23 16:44:24 +01:00
suit suit: start worker thread on demand 2022-09-05 07:46:56 +02:00
sys sys/bus: add system buses 2020-11-12 22:50:53 +01:00
test_utils sys/test_utils: mark expect() condition as likely true 2023-01-18 01:17:31 +01:00
usb usbus/cdc_ecm: Make use of URBs for inbound frames 2023-02-27 10:09:55 +01:00
xtimer doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
ztimer ztimer/convert: pass-thru start/stop ops to lower timer 2022-11-22 00:25:34 +01:00
ztimer64 ztimer(64): make xtimer_compat documetation visible (defgroup) 2022-08-09 14:26:49 +02:00
analog_util.h
app_metadata.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
architecture.h sys/architecture: introduce uinttxtptr_t 2022-07-13 23:19:33 +02:00
atomic_utils.h core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
auto_init_utils.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
auto_init.h pkg/lwip: Start rework of netif initialisation 2021-08-20 14:56:46 +02:00
base64.h sys/base64: Use void pointer for buffers in API 2020-07-02 11:10:06 +02:00
bcd.h
benchmark.h sys/benchmark: wrap BENCHMARK_FUNC in do {} while (0) 2022-02-11 14:24:38 +01:00
bhp.h sys/bhp: add initial support for generic Bottom Half Processor 2022-08-11 10:57:53 +02:00
bit.h sys/bit: add bit_checkXX() functions 2021-06-02 14:07:17 +02:00
bitfield.h sys/bitfield: don't use ambiguous 'size of the bitfield' 2022-12-13 13:09:31 +01:00
bloom.h codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
byteorder.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
c11_atomics_compat.hpp doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
cb_mux.h
chunked_ringbuffer.h sys/chunked_ringbuffer: move config to CONFIG_ namespace 2022-03-04 09:35:39 +01:00
clif.h sys/clif: Fixing out of bounds read under certain conditions 2023-02-23 15:45:03 +01:00
clk.h sys: introduce coreclk utility function 2021-12-15 12:41:36 +01:00
color.h
congure.h congure_test: initial import of CongURE test framework 2021-02-26 10:08:12 +01:00
cppunit.hpp core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
dbgpin.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
debug_irq_disable.h cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
div.h
eepreg.h
embUnit.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
entropy_source.h sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event.h sys/event: ensure that a queue has a waiter before waiting for flags 2022-04-14 17:10:24 +02:00
evtimer_mbox.h evtimer: add mbox support 2020-08-21 15:19:22 +02:00
evtimer_msg.h
evtimer.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
flash_utils.h sys/flash_utils: add helpers for placing variables in flash 2023-02-27 12:31:03 +01:00
fmt_table.h
fmt.h sys/fmt: add print_bytes_hex() 2022-11-15 22:05:42 +01:00
frac.h sys/frac: make gcd32() public 2020-10-22 11:10:14 +02:00
fuzzing.h fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
iolist.h sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
irq.hpp core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
isrpipe.h sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
luid.h sys/luid: add luid_netdev_get_eui48() & luid_netdev_get_eui64() 2020-08-18 11:45:45 +02:00
matstat.h
memarray.h memarray: Add extend and reduce functions 2021-01-15 11:39:08 +01:00
mineplex.h
od.h sys/od: allow to specify address offset with od_hex_dump_ext() 2021-01-11 14:35:40 +01:00
phydat.h sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
pipe.h
pm_layered.h sys/pm_layered: align pm_blocker_t for speed 2022-11-04 16:50:52 +01:00
progress_bar.h sys/progress_bar: add Konfig configuration 2021-04-07 12:05:00 +02:00
ps.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
ptrtag.h sys: Add helpers for pointer tagging 2020-11-17 10:10:28 +01:00
puf_sram.h sys/puf_sram: cleanup header 2022-12-05 16:13:21 +01:00
random.h random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
rtc_utils.h sys/rtc_utils: small doc fix of rtc_mktime 2022-06-12 15:49:01 +02:00
saul_reg.h drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin.h sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics.h schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema_inv.h sys/sema_inv: add inverse Semaphore 2021-01-17 00:17:58 +01:00
sema.h sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
senml.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
seq.h
shell_lock.h sys/shell: add pseudomodule shell_lock_auto_locking 2022-06-08 12:53:48 +02:00
shell.h sys/shell: use flash_utils 2023-02-27 12:31:03 +01:00
stdio_base.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
stdio_nimble.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
stdio_rtt.h sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
stdio_semihosting.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
stdio_uart.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
string_utils.h sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
suit.h suit: replace SUIT_URL_MAX with CONFIG_SOCK_URLPATH_MAXLEN 2022-06-01 13:00:51 +02:00
time_units.h sys/include/time_units.h: add more constants 2022-05-05 11:31:45 +02:00
timex.h sys: factor out US_PER_SEC etc from timex.h into time_units.h 2021-12-15 14:33:20 +01:00
tiny_strerror.h sys/tiny_strerror: add tiny_strerror_minimal 2022-10-18 23:30:15 +02:00
tm.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
trace.h sys/trace: initial commit 2020-06-10 21:21:33 +02:00
trickle.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
tsrb.h sys/tsrb: add tsrb_clear 2021-12-06 11:53:59 +01:00
unaligned.h sys/unaligned: Add 64 bit version 2020-08-14 12:21:24 +02:00
universal_address.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
uri_parser.h sys/uri_parser: Adding the port as uint16 2022-09-08 11:32:49 +02:00
usb_board_reset_internal.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb_board_reset.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb.h sys/usb: Set USB model to $(BOARD) by default 2022-08-29 16:39:05 +02:00
ut_process.h ut_process: initial import of a URI template processor 2021-09-16 18:18:48 +02:00
utlist.h sys/utlist: include stddef.h 2022-02-12 18:30:58 +01:00
uuid.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
vfs_default.h Merge #18682 2023-02-25 18:59:07 +00:00
vfs_util.h sys/vfs_util: add recursive unlink 2022-08-03 22:09:21 +02:00
vfs.h pkg/lwext4: add lwEXT4 2023-02-25 14:01:20 +01:00
volatile_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
xtimer.h sys/ztimer: add ztimer64_xtimer_compat 2022-02-24 09:10:58 +01:00
zptr.h sys/zptr: fix typos 2020-10-02 08:15:00 +02:00
ztimer64.h sys/ztimer: add ztimer64_xtimer_compat 2022-02-24 09:10:58 +01:00
ztimer.h ztimer: introduce ztimer_mutex_unlock_after() 2023-01-13 00:08:55 +01:00