summaryrefslogtreecommitdiff
path: root/src/esp32p4/uart.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-23 11:00:44 -0300
committerGabriel Schneider <[email protected]>2026-10-23 17:10:58 -0300
commit80314064f6e81c8828340e010202b446f0e1f36d (patch)
treeaa56e86238ac9397055f601db924868bb6511538 /src/esp32p4/uart.zig
parenta53a1aafb9804e943bdcd720c2bb688ecb90a888 (diff)
downloadpardes-80314064f6e81c8828340e010202b446f0e1f36d.tar.gz
pardes-80314064f6e81c8828340e010202b446f0e1f36d.zip
Audit (misc): std mkdir -p and JSON escaping, a 9P late failure's errno from ctl.failureErrno, dead switches and dumpHex out
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/esp32p4/uart.zig')
-rw-r--r--src/esp32p4/uart.zig16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/esp32p4/uart.zig b/src/esp32p4/uart.zig
index 5690520c..a185737d 100644
--- a/src/esp32p4/uart.zig
+++ b/src/esp32p4/uart.zig
@@ -126,22 +126,6 @@ pub fn writeByte(b: u8) void {
uart0.pushByte(b);
}
-/// Emit `n` bytes read from `addr` as two hex digits each, computing the digits arithmetically so
-/// nothing here reads a lookup table. Used to answer "does a load from this address return what the
-/// linker put there", which is not a question a string literal can be trusted to ask.
-pub fn dumpHex(addr: u32, n: u32) void {
- const p: [*]const volatile u8 = @ptrFromInt(addr);
- var i: u32 = 0;
- while (i < n) : (i += 1) {
- const byte = p[i];
- for ([2]u8{ byte >> 4, byte & 0xf }) |nib| {
- writeByte(if (nib < 10) '0' + nib else 'a' + (nib - 10));
- }
- }
- writeByte('\r');
- writeByte('\n');
-}
-
/// A u32 as eight hex digits, reading no memory at all.
pub fn dumpWord(v: u32) void {
var shift: u5 = 28;