From a1883e93c1094ed34c21e018d34993e2a9e80506 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 21 Feb 2025 12:23:09 -0700 Subject: Complete TODO comments and documentation --- GNUmakefile | 2 +- HACKING.md | 195 +++++++++++++++++++++++++++++++++++-- README.md | 163 ++++++++----------------------- cmd/sbc_harness/usb_keyboard.c | 4 +- lib9p/CMakeLists.txt | 2 +- lib9p/include/lib9p/9p.h | 41 ++++++-- lib9p/internal.h | 2 +- lib9p/tests/runtest | 2 +- lib9p_util/CMakeLists.txt | 4 +- libcr/CMakeLists.txt | 4 +- libcr/tests/test_matrix/config.h | 4 +- libcr_ipc/CMakeLists.txt | 2 +- libcr_ipc/tests/config.h | 4 +- libdhcp/CMakeLists.txt | 4 +- libhw/rp2040_include/libhw/w5500.h | 10 +- libmisc/CMakeLists.txt | 2 +- 16 files changed, 281 insertions(+), 164 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index f1ed37f..5f49647 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -131,7 +131,7 @@ format/python3: format/%: ./build-aux/venv format/sh format/bash: format/% @: format/c: format/%: - @: TODO + @: TODO: Adopt a C code-formatter format/make format/cmake format/gitignore format/ini format/9p format/markdown: format/%: @: format/unknown: format/%: diff --git a/HACKING.md b/HACKING.md index 9b016aa..d522034 100644 --- a/HACKING.md +++ b/HACKING.md @@ -1,16 +1,193 @@ -Source layout +# Source Layout - - cmd/sbc_harness - - cmd/srv9p - - libcr - A simple coroutine (cooperative multitasking) library - - libcr_ipc - IPC primatives for coroutines built on top of libcr - - libnet - TODO - - lib9p - A simple 9P protocol server library - - libusb - TODO +Our own "flavor" of C: GNU C plus `-fplan9-extensions`, making use of: + + - `libobj/`: For Go-like object-oriented programming + - `libmisc/`: Low-level C programming utilities; sort of an augmented + "libc" + +Our own tiny cooperative-multitasking OS: + + - `libcr/`: The kernel (a simple coroutine library) + - `libcr_ipc/`: IPC primatives (semaphores, mutexes, channels, ...) + for libcr + - `libhw/`: The hardware drivers + - `libhw_generic/`: The hardware abstraction layer + +Libraries for generic parts of what the harness is doing: + + - `lib9p/`: a 9P network filesystem server library + - `lib9p_util/`: Utilities for use with lib9p + - `libdhcp/`: A DHCP client + - `libusb/`: Wrapper and utilities for TinyUSB + + - `cmd/sbc_harness/`: The main firmware image + - `3rd-party/`: Sources from third parties; some definitions of + things (USB language codes, Linux kernel errnos), and the Pico-SDK + (for the RP2040 CPU, and its included TinyUSB). Does not include + newlib, which you need to have installed separately. + - `build-aux/`: Build-system files + +# Debugging + +There are 2 "debug" connectors on the harness: + +## UART (Universal Asynchronous Receiver/Transmitter) logging + +Baud rate: 115200 + +Pinout: +| RPi Pico | RP2040 | Use | +|----------|--------|----------------------------------------| +| pin1 | gpio0 | TX (so connect it to your FTDI's RX) | +| pin2 | gpio1 | RX (so connect it to your FTDI's TX) | +| pin3 | | gnd (so connect it to your FTDI's GND) | + +Example use: + +> I use `picocom` (because it's small and Parabola GNU/Linux-libre +> has it), but other programs such as GNU Screen or minicom work +> as well. +> +> I sometimes use a Rasberry Pi Debug Probe (see below) as my +> UART-to-USB adapter because it's convenient because I'm using it +> anyway for ARM SWD. I sometimes use a FTDI-brand adapter because it +> seems to be more reliable; the Debug Probe can sometimes get +> messed-up byte boundaries. +> +> Depending on your UART adapter, on GNU/Linux the device may be +> named either `/dev/ttyUSB{n}` or `/dev/ttyACM{n}`. +> +> - `picocom --baud=115200 /dev/ttyUSB0` +> - `picocom --baud=115200 /dev/ttyACM0` + +## ARM SWD (Serial Wire Debug) + +Pinout: Separate from the main 40-pin layout of the RPi Pico, there +are 3 separate ARM SWD pins; they may have a [Raspberry Pi 3-pin Debug +Connector][#raspberry-pi-3-pin-debug-connector] socket soldered to +them, or may just be regular pin headers. +| Pin # | ARM SW-DP (Single-Wire Debug-Port) | +|-------|------------------------------------| +| 1 | SC/SWCLK (serial clock) | +| 2 | GND | +| 3 | SD/SWDIO (bidi serial data) | +| N/C | SWO (optional: serial wire output) | + +The RP2040 CPU speaks the ADIv5 SWD protocol on this port; you need a +separate USB device to translate this to the ARM CMSIS-DAP protocol (a +USB-based protocol), and then a piece of software on your PC to talk +CMSIS-DAP; likely [OpenOCD](https://openocd.org/) to bridge to the GNU +Debugger (GDB): + +``` +┌─[Host PC]─────────────────────────┐ +│ ┌─────┐ │ +│ │ GDB │ │ +│ └─────┘ │ +│ ⇑ │ +│ ║ GDB Remote Serial Protocol on localhost:3333 +│ ⇓ │ +│ ┌─────────┐ │ +│ │ OpenOCD │ │ +│ └─────────┘ │ +│ ⇑ │ +└─────────────────║─────────────────┘ + USB-A + ║ ARM CMSIS-DAP protocol (a USB-based protocol) + (micro)USB-B + ┌─[Debug Probe]───────┐ + │ ⇓ │ + │ ┌────────────────┐ │ + │ │ ARM's │ │ + │ │ reference │ │ + │ │ CMSIS-DAP │ │ + │ │ implementation │ │ + │ └────────────────┘ │ + │ ⇑ │ + └──────────║──────────┘ + SW-DP (3-pin JST-SH) + ║ ADIv5 SWD protocol + SW-DP (3 .1" headers) +┌─[SBC-Harness]───║─────────────────┐ +│ ╔═══════════════╝ │ +│ ║ ┌────────────────────────────┐ │ +│ ║ │ Cortex-M0+ (core 0) │ │ +│ ║ │ ┌────────────────────────┐ │ │ +│ ╠═══⇒│ CoreSight ADIv5 module │ │ │ +│ ║ │ └────────────────────────┘ │ │ +│ ║ └────────────────────────────┘ │ +│ ║ ┌────────────────────────────┐ │ +│ ║ │ Cortex-M0+ (core 1) │ │ +│ ║ │ ┌────────────────────────┐ │ │ +│ ╚═══⇒│ CoreSight ADIv5 module │ │ │ +│ │ └────────────────────────┘ │ │ +│ └────────────────────────────┘ │ +└───────────────────────────────────┘ +``` + +Example use: + +> For the device that translates from ADIv5 SWD to CMSIS-DAP, I use +> the [Raspberry Pi Debug +> Probe](https://www.raspberrypi.com/products/debug-probe/) because it +> is cheap, runs Free Software, and is also a UART-to-USB adapter, so +> I can use it for both ports with less clutter on my desk ([source +> code](https://github.com/raspberrypi/debugprobe), +> [tutorial](https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html). +> Another freedom-friendly option is the +> https://oshwlab.com/wagiminator/samd11c-swd-programmer which uses +> https://github.com/ataradov/free-dap instead of ARM's reference +> CMSIS implementation; but I have not tried it. +> +> I use OpenOCD for talking CMSIS-DAP from my laptop, but pyOCD is +> another option. +> +> In one terminal: +> - `openocd -f interface/cmsis-dap.cfg -c 'set USE_CORE 0' -f target/rp2040.cfg -c "adapter speed 5000"` +> (Explanation of `USE_CORE`: https://github.com/raspberrypi/debugprobe/issues/45) +> In another terminal: +> - `arm-none-eabi-gdb ./build/rp2040-Debug/cmd/sbc_harness/sbc_harness.elf` +> ``` +> target extended-remote localhost:3333 +> monitor reset init +> continue +> ``` +> See https://openocd.org/doc/html/General-Commands.html for +> documentation on the commands that you can send from GDB to +> OpenOCD with `monitor`. + +References: +- https://developer.arm.com/documentation/101761/1-0/Debug-and-trace-interface/Serial-Wire-Debug-signals +- https://developer.arm.com/documentation/ihi0031/a/The-Serial-Wire-Debug-Port--SW-DP-/Introduction-to-the-ARM-Serial-Wire-Debug--SWD--protocol +- https://arm-software.github.io/CMSIS-DAP/latest/index.html +- ADIv5: https://developer.arm.com/documentation/ihi0031/g/ +- ADIv6: https://developer.arm.com/documentation/ihi0074/e/ + +# Other references + +## Raspberry Pi 3-pin Debug Connector + +- https://datasheets.raspberrypi.com/debug/debug-connector-specification.pdf + +| Pin # | UART | ARM SW-DP | cJTAG (IEEE 1149.7) | +|-------|----------------------|------------------------------------|----------------------------------| +| 1 | RX (target←debugger) | SC/SWCLK (serial clock) | TMSC - Test Clock Control | +| 2 | GND | GND | GND | +| 3 | TX (target→debugger) | SD/SWDIO (bidi serial data) | TCKC - Test Master/Slave Control | +| | | SWO (optional: serial wire output) | | + +Note that the RP2040 chip has a pure SW-DP (just speaks SWD), not a +JTAG-DP (just speaks JTAG) nor a SWJ-DP (can speak either SWD or +JTAG). + +The Raspberry Pi Debug Probe has 2 debug connectors on it; one to +connect to the UART (labeled "U"), one to connect to the SWD (labeled +"D"). diff --git a/README.md b/README.md index 60fdfbd..0e4b280 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Building -Building requires cmake, make, an "arm-none-eabi" toolchain (including -newlib), and picotool (including the .cmake files; -eg. /usr/lib/cmake/picotool/*.cmake). +Building requires CMake, GNU Make, an "arm-none-eabi" toolchain +(including newlib), and picotool (including the `.cmake` files; +e.g. `/usr/lib/cmake/picotool/*.cmake`). At the time of this writing, on Parabola GNU/Linux-libre that means: @@ -20,122 +20,35 @@ At the time of this writing, on Parabola GNU/Linux-libre that means: - arm-none-eabi-newlib 4.4.0.20231231-1 - picotool 2.0.0-2 -```bash -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Debug .. -make -``` -# Debugging - -UART: -- pin1: gpio0: TX (so connect it to your FTDI's RX) -- pin2: gpio1: RX (so connect it to your FTDI's TX) -- pin3: gnd (so connect it to your FTDI's GND) -- `picocom --baud=115200 /dev/ttyUSB0` -- `picocom --baud=115200 /dev/ttyACM0` - -- `openocd -f interface/cmsis-dap.cfg -c 'set USE_CORE 0' -f target/rp2040.cfg -c "adapter speed 5000"` - (Explanation of `USE_CORE`: https://github.com/raspberrypi/debugprobe/issues/45) -- `arm-none-eabi-gdb ./build/rp2040-Debug/cmd/sbc_harness/sbc_harness.elf` - ``` - target extended-remote localhost:3333 - monitor reset init - continue - ``` - https://openocd.org/doc/html/General-Commands.html - -SWD: -- https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html -- https://github.com/raspberrypi/debugprobe -- https://developer.arm.com/documentation/101451/0100/About-CMSIS-DAP - -## Raspberry Pi 3-pin Debug Connector -- https://datasheets.raspberrypi.com/debug/debug-connector-specification.pdf - -| Pin # | UART | ARM SW-DP | cJTAG (IEEE 1149.7) | -|-------|----------------------|------------------------------------|----------------------------------| -| 1 | RX (target←debugger) | SC/SWCLK (serial clock) | TMSC - Test Clock Control | -| 2 | GND | GND | GND | -| 3 | TX (target→debugger) | SD/SWDIO (bidi serial data) | TCKC - Test Master/Slave Control | -| | | SWO (optional: serial wire output) | | - -## UART (Universal asynchronous receiver/transmitter) - -## ARM SWD (Serial Wire Debug) -- https://developer.arm.com/documentation/101761/1-0/Debug-and-trace-interface/Serial-Wire-Debug-signals -- https://developer.arm.com/documentation/ihi0031/a/The-Serial-Wire-Debug-Port--SW-DP-/Introduction-to-the-ARM-Serial-Wire-Debug--SWD--protocol -- https://arm-software.github.io/CMSIS-DAP/latest/index.html -- ADIv5: https://developer.arm.com/documentation/ihi0031/g/ -- ADIv6: https://developer.arm.com/documentation/ihi0074/e/ - -Alternative to Raspberry Pi Debug Probe: -https://oshwlab.com/wagiminator/samd11c-swd-programmer which uses -https://github.com/ataradov/free-dap instead of ARM's reference CMSIS -implementation - -Note that the RP2040 chip has a pure SW-DP (just speaks SWD), not a -JTAG-DP (just speaks JTAG) or a SWJ-DP (can speak either SWD or JTAG). - -``` -+-[Host PC]-------------------------+ -| | -| +-----+ | -| | GDB | | -| +-----+ | -| ^ | -| | GDB Remote Serial Protocol -| | on localhost:3333 -| V | -| +---------+ | -| | OpenOCD | | -| +---------+ | -| ^ | -| | | -+-----------------|-----------------+ - USB-A - | - | ARM CMSIS-DAP protocol - | (a USB-based protocol) - | - (micro)USB-B - +-[Debug Probe]-------+ - | | | - | V | - | +----------------+ | - | | ARM's | | - | | reference | | - | | CMSIS-DAP | | - | | implementation | | - | +----------------+ | - | ^ | - | | | - +----------|----------+ - SW-DP (3-pin JST-SH) - | - | ADIv5 SWD protocol - | - SW-DP (3 .1" headers) -+-[SBC-Harness]---|-----------------+ -| | | -| ,---------------' | -| | | -| | +----------------------------+ | -| | | Cortex-M0+ | | -| | | +------------------------+ | | -| +--->| CoreSight ADIv5 module | | | -| | | +------------------------+ | | -| | +----------------------------+ | -| | | -| | +----------------------------+ | -| | | Cortex-M0+ | | -| | | +------------------------+ | | -| `--->| CoreSight ADIv5 module | | | -| | +------------------------+ | | -| +----------------------------+ | -| | -+-----------------------------------+ -``` +Then, simply run `make`. This will create +`build/rp2040-*/cmd/sbc_harness/sbc_harness.{bin,uf2,elf}` files. The +`.bin` file is the raw firmware image; the `.uf2` file is that wrapped +into a [USB Flashing Format (UF2)](https://github.com/microsoft/uf2) +container that can be used with the bootrom flasher (yes, the +`.uf2` is expected to be about twice the size of the `.bin`); the +`.elf` is the firmware image plus debugger symbols. + +There are several ways of putting this firmware file onto the harness: + + 1. bootrom flasher: Hold the "BOOTSEL" button when powering on. The + harness will appear to a host PC as a USB storage device. Simply + mount the device and copy the `.uf2` file to the device. It will + automatically reboot into the new firmware image. + 2. debug port: Using OpenOCD (see `HACKING.md`), run the OpenOCD command + `program /path/to/sbc_harness.elf reset`. + + If OpenOCD is not already running: + ``` + openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "program $PWD/build/rp2040-Debug/cmd/sbc_harness/sbc_harness.elf reset exit"` + ``` + + If OpenOCD is already running: + ``` + socat STDIO TCP:localhost:4444 <<<"program $PWD/build/rp2040-Debug/cmd/sbc_harness/sbc_harness.elf reset" + ``` + 3. Use `flashprog` or `flashrom` and a SOIC-8 clip to directly + program the flash chip. I'm not sure why you would do this + instead of one of the above. # Usage @@ -164,7 +77,7 @@ There are lots of 9P clients that you can use. 9P is a filesystem protocol; and you can mount it directly with the the Linux kernel's v9fs filesystem driver, with plan9port's `9pfuse`; or interact with it without mounting it using the shell commands `9p` (from plan9port), -`wmiir`, `ixpc`; or interact with it without mounting it by using a +`wmiir`, or `ixpc`; or interact with it without mounting it by using a library for your programming language of choice. Some notes on choosing a client: @@ -174,18 +87,18 @@ Some notes on choosing a client: - I generally like mounting it as a real filesystem, but this means that you only get errno errors, and the more-helpful error strings are discarded. - - The sbc-harness only supports 8 concurrent connections to the 9P + - The sbc-harness only supports 7 concurrent connections to the 9P server, so while shell commands are handy for poking around, for real use where you're doing things in parallel you'll likely want to mount it or use a library that can reuse existing connections. # Bugs/Limitations - - Only supports 8 concurrent TCP connectsions to the 9P server (due + - Only supports 7 concurrent TCP connectsions to the 9P server (due to limitations in the W5500 TCP-offload chip; TODO: investigate using a software TCP/IP stack with the W5500 in MAC-raw mode) - - Only supports 16 concurrent 9P requests (I wanted a static limit, - and "connections*2" seemed reasonable) + - Only supports 2 concurrent 9P requests per connection (I wanted a + static limit, and 2 seemed reasonable) - Only supports IPv4, not IPv6 (due to limitations in the W5500 TCP-offload chip; TODO: investigate upgrading to the W6100 or using a software TCP/IP stack with the W5500 in MAC-raw mode) diff --git a/cmd/sbc_harness/usb_keyboard.c b/cmd/sbc_harness/usb_keyboard.c index b781d4d..f3cb42d 100644 --- a/cmd/sbc_harness/usb_keyboard.c +++ b/cmd/sbc_harness/usb_keyboard.c @@ -1,6 +1,6 @@ /* sbc_harness/usb_keyboard.c - Implementation of a USB keyboard device * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -95,7 +95,7 @@ uint8_t const *tud_hid_descriptor_report_cb(uint8_t index) { uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) { - // TODO not Implemented + // TODO not implemented (void) instance; (void) report_id; (void) report_type; diff --git a/lib9p/CMakeLists.txt b/lib9p/CMakeLists.txt index 2f5fc70..b356288 100644 --- a/lib9p/CMakeLists.txt +++ b/lib9p/CMakeLists.txt @@ -1,4 +1,4 @@ -# lib9p/CMakeLists.txt - TODO +# lib9p/CMakeLists.txt - A 9P protocol and server library # # Copyright (C) 2024-2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index f743afb..7724fc8 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -63,7 +63,7 @@ int lib9p_errorf(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *fmt, . /* main T-message functions ***************************************************/ /** - * Validate a message's structure; it's size, string encodings, enums, + * Validate a message's structure; its size, string encodings, enums, * and bitfields. * * Return how much space the message will take when unmarshaled. This @@ -91,13 +91,10 @@ ssize_t lib9p_Tmsg_validate(struct lib9p_ctx *ctx, uint8_t *net_bytes); /** * Unmarshal the 9P message `net_bytes` into the C struct `ret_body`. * - * Emits an error (return 0, set ctx->err_num and ctx->err_msg) if a - * string contains invalid UTF-8 or a nul-byte. - * - * lib9p_unmarshal does no validation; you must run + * lib9p_Tmsg_unmarshal does no validation; you must run * lib9p_Tmsg_validate() first. * - * @param ctx : negotiated protocol parameters, where to record errors + * @param ctx : negotiated protocol parameters * @param net_bytes : the complete message, starting with the "size[4]" * * @return ret_typ : the mesage type @@ -152,17 +149,27 @@ static inline void lib9p_stat_assert(struct lib9p_stat stat) { } /** - * TODO + * Validate a message's `stat` structure. + * + * @param ctx : negotiated protocol parameters, where to record errors + * @param net_bytes : network-encoded stat structure + * @param net_size : the number of net_bytes that may be read * - * @return ret_net_size: number of bytes consumed; <=net_size - * @return ret_host_size: number of bytes that lib9p_stat_unmarshal would take + * @return ret_net_size : number of bytes consumed; <=net_size + * @return ret_host_size : number of bytes that lib9p_stat_unmarshal would take * @return whether there was an error */ bool lib9p_stat_validate(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes, uint32_t *ret_net_size, ssize_t *ret_host_size); /** - * TODO + * Unmarshal the 9P `net_bytes` into the C struct `ret_obj`. + * + * lib9p_stat_unmarshal does no validation; you must run + * lib9p_stat_validate() first. + * + * @param ctx : negotiated protocol parameters + * @param net_bytes : network-encoded stat structure * * @return ret_obj : where to put the stat object itself * @return ret_extra : where to put strings for the stat object @@ -172,8 +179,22 @@ uint32_t lib9p_stat_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, struct lib9p_stat *ret_obj, void *ret_extra); /** + * Marhsal a `struct lib9p_stat` structure into a byte-array. + * + * lib9p_Tmsg_marshal does no validation; it trusts that the + * programmer won't give it garbage input. However, just as it + * doesn't marshal struct fields that aren't in ctx->version, it won't + * marshal bitfield bits that aren't in ctx->version; it applies a + * version-specific mask to bitfields. + * + * @param ctx : negotiated protocol parameters, where to record errors + * @param max_net_size : the maximum network-encoded size to allow + * @param obj : the message to encode + * * @return ret_bytes: the buffer to encode into * @return the number of bytes written, or 0 if the stat object does not fit in max_net_size + * + * @errno LINUX_ERANGE: reply does not fit in max_net_size */ uint32_t lib9p_stat_marshal(struct lib9p_ctx *ctx, uint32_t max_net_size, struct lib9p_stat *obj, uint8_t *ret_bytes); diff --git a/lib9p/internal.h b/lib9p/internal.h index 1f4975f..801dc4c 100644 --- a/lib9p/internal.h +++ b/lib9p/internal.h @@ -1,4 +1,4 @@ -/* lib9p/internal.h - TODO +/* lib9p/internal.h - Internal machinery shared between parts of lib9p * * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib9p/tests/runtest b/lib9p/tests/runtest index 59c8cca..c2f6c41 100755 --- a/lib9p/tests/runtest +++ b/lib9p/tests/runtest @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# lib9p/tests/runtest - TODO +# lib9p/tests/runtest - Simple tests for the 9P `test_server` # # Copyright (C) 2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib9p_util/CMakeLists.txt b/lib9p_util/CMakeLists.txt index 7a42c0c..4fbdb7a 100644 --- a/lib9p_util/CMakeLists.txt +++ b/lib9p_util/CMakeLists.txt @@ -1,6 +1,6 @@ -# lib9p_util/CMakeLists.txt - TODO +# lib9p_util/CMakeLists.txt - Utilities for using the lib9p server # -# Copyright (C) 2024 Luke T. Shumaker +# Copyright (C) 2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later add_library(lib9p_util INTERFACE) diff --git a/libcr/CMakeLists.txt b/libcr/CMakeLists.txt index 130b018..0a4696c 100644 --- a/libcr/CMakeLists.txt +++ b/libcr/CMakeLists.txt @@ -1,6 +1,6 @@ -# libcr/CMakeLists.txt - TODO +# libcr/CMakeLists.txt - Simple embeddable coroutine implementation # -# Copyright (C) 2024 Luke T. Shumaker +# Copyright (C) 2024-2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later add_library(libcr INTERFACE) diff --git a/libcr/tests/test_matrix/config.h b/libcr/tests/test_matrix/config.h index 83892df..978b9ac 100644 --- a/libcr/tests/test_matrix/config.h +++ b/libcr/tests/test_matrix/config.h @@ -1,6 +1,6 @@ -/* config.h - TODO +/* config.h - Compile-time configuration for libcr test_matrix * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ diff --git a/libcr_ipc/CMakeLists.txt b/libcr_ipc/CMakeLists.txt index a7d6021..0c3bd57 100644 --- a/libcr_ipc/CMakeLists.txt +++ b/libcr_ipc/CMakeLists.txt @@ -1,4 +1,4 @@ -# libcr_ipc/CMakeLists.txt - TODO +# libcr_ipc/CMakeLists.txt - IPC primitives for libcr # # Copyright (C) 2024-2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/libcr_ipc/tests/config.h b/libcr_ipc/tests/config.h index 2a5cbc9..b00508c 100644 --- a/libcr_ipc/tests/config.h +++ b/libcr_ipc/tests/config.h @@ -1,6 +1,6 @@ -/* config.h - TODO +/* config.h - Compile-time configuration for the libcr_ipc tests * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ diff --git a/libdhcp/CMakeLists.txt b/libdhcp/CMakeLists.txt index 2ded1f4..72b0952 100644 --- a/libdhcp/CMakeLists.txt +++ b/libdhcp/CMakeLists.txt @@ -1,6 +1,6 @@ -# libdhcp/CMakeLists.txt - TODO +# libdhcp/CMakeLists.txt - A DHCP client # -# Copyright (C) 2024 Luke T. Shumaker +# Copyright (C) 2024-2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later add_library(libdhcp INTERFACE) diff --git a/libhw/rp2040_include/libhw/w5500.h b/libhw/rp2040_include/libhw/w5500.h index ab9f50e..98e54ec 100644 --- a/libhw/rp2040_include/libhw/w5500.h +++ b/libhw/rp2040_include/libhw/w5500.h @@ -86,12 +86,18 @@ void _w5500_init(struct w5500 *self, struct net_eth_addr addr); /** - * TODO. + * Perform a hard reset on the chip (pull the reset line low). + * + * If you have any in-use sockets when you call this, you're going to + * have a bad time. */ void w5500_hard_reset(struct w5500 *self); /** - * TODO. + * Perform a soft reset on the chip (send the RST command). + * + * If you have any in-use sockets when you call this, you're going to + * have a bad time. */ void w5500_soft_reset(struct w5500 *self); diff --git a/libmisc/CMakeLists.txt b/libmisc/CMakeLists.txt index f8f15bc..70ec691 100644 --- a/libmisc/CMakeLists.txt +++ b/libmisc/CMakeLists.txt @@ -1,4 +1,4 @@ -# libmisc/CMakeLists.txt - TODO +# libmisc/CMakeLists.txt - Low-level C programming utilities; sort of an augmented "libc" # # Copyright (C) 2024-2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later -- cgit v1.2.3-2-g168b