diff options
Diffstat (limited to 'src/nio.c')
| -rw-r--r-- | src/nio.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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(); |
