From 38e3d2758f1eb4130e9a5197095c08e7d500564f Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 31 Aug 2005 23:35:08 +0000 Subject: [PATCH] Add PBSyncStatus() and its serial status commands --- second/glue.S | 10 ++++++++++ second/glue.h | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/second/glue.S b/second/glue.S index 58c08fe..a0da052 100644 --- a/second/glue.S +++ b/second/glue.S @@ -393,6 +393,16 @@ PBControlSync: unlk %fp rts + /* OSErr PBStatusSync(ParmBlkPtr paramBlock) */ + + .global PBStatusSync +PBStatusSync: + link %fp, #0 + move.l 8(%fp), %a0 + dc.w 0xA005 /* PBStatusSync */ + unlk %fp + rts + /* void SysError(short errorCode) */ .global SysError diff --git a/second/glue.h b/second/glue.h index f8a3c25..9203fe1 100644 --- a/second/glue.h +++ b/second/glue.h @@ -246,11 +246,19 @@ extern OSErr Gestalt(unsigned long selector, long * response); extern void ReadLocation(MachineLocation * loc); extern void* NewPtr(unsigned long byteCount); extern void DisposePtr(void* ptr); + +enum { + kSERDInputCount = 2, /* get available characters count (SerGetBuf) */ + kSERDStatus = 8, /* get status information (SerStatus) */ + kSERDVersion = 9, /* get driver version */ +}; + extern OSErr PBReadSync(ParamBlockRec_t* paramBlock); extern OSErr PBWriteSync(ParamBlockRec_t* paramBlock); extern OSErr PBOpenSync(ParmBlkPtr paramBlock); extern OSErr PBCloseSync(ParmBlkPtr paramBlock); extern OSErr PBControlSync(ParmBlkPtr paramBlock); +extern OSErr PBStatusSync(ParmBlkPtr paramBlock); extern void SysError(short errorCode); typedef u_int32_t KeyMap[4];