From 3e263c1974217018a3ccf2d777fec9fecc0ca9a4 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 2 Jun 2024 06:21:42 +0800 Subject: [PATCH] update docs to match small change to spec --- libs/xous-bio/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/xous-bio/src/lib.rs b/libs/xous-bio/src/lib.rs index 7ebec518e..ab15d5b86 100644 --- a/libs/xous-bio/src/lib.rs +++ b/libs/xous-bio/src/lib.rs @@ -8,12 +8,16 @@ //! or an external event comes in on a host-specified GPIO pin. //! - x20 -/w halt to quantum //! -//! GPIO - note clear-on-0 semantics for bit-clear ops +//! GPIO - note clear-on-0 semantics for bit-clear for data pins! +//! This is done so we can do a shift-and-move without an invert to +//! bitbang a data pin. Direction retains a more "conventional" meaning +//! where a write of `1` to either clear or set will cause the action, +//! as pin direction toggling is less likely to be in a tight inner loop. //! - x21 r/w write: (x26 & x21) -> gpio pins; read: gpio pins -> x21 //! - x22 -/w (x26 & x22) -> `1` will set corresponding pin on gpio //! - x23 -/w (x26 & x23) -> `0` will clear corresponding pin on gpio //! - x24 -/w (x26 & x24) -> `1` will make corresponding gpio pin an output -//! - x25 -/w (x26 & x25) -> `0` will make corresponding gpio pin an input +//! - x25 -/w (x26 & x25) -> `1` will make corresponding gpio pin an input //! - x26 r/w mask GPIO action outputs //! //! Events - operate on a shared event register. Bits [7:0] are hard-wired to FIFO