From ddfe09f3b8336630dd0f87e446306bc1e012f20b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 30 Mar 2026 03:25:35 -0400 Subject: Trim down nio API (no parameter passing), now at 4852 free. --- src/nio.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/nio.c') diff --git a/src/nio.c b/src/nio.c index 9deae3c..d848e18 100644 --- a/src/nio.c +++ b/src/nio.c @@ -73,23 +73,27 @@ char nstatus(void) { return OS.dvstat[DVSTAT_EXTENDED_ERROR]; // return extended status } -char nread(char *buf, unsigned short len) { +char nread_rxbuf(void) { + extern unsigned int rxbuflen; + extern char *rx_buf; set_defaults(); OS.dcb.dcomnd = 'R'; // read OS.dcb.dstats = DREAD; - OS.dcb.dbuf = buf; - OS.dcb.dbyt = OS.dcb.daux = len; // Set the buffer size AND daux with length + OS.dcb.dbuf = rx_buf; + OS.dcb.dbyt = OS.dcb.daux = rxbuflen; // Set the buffer size AND daux with length siov(); return get_status(); } -char nwrite(char *buf, unsigned short len) { +char nwrite_txbuf(void) { + extern unsigned int txbuflen; + extern char *tx_buf; set_defaults(); OS.dcb.dcomnd = 'W'; // write OS.dcb.dstats = DWRITE; - OS.dcb.dbuf = buf; - OS.dcb.dbyt = OS.dcb.daux = len; + OS.dcb.dbuf = tx_buf; + OS.dcb.dbyt = OS.dcb.daux = txbuflen; siov(); return get_status(); -- cgit v1.2.3