123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- #ifndef __USA67MSG__
- #define __USA67MSG__
- typedef struct keyspan_usa67_portControlMessage
- {
- u8 port;
-
- u8 setClocking,
- baudLo,
- baudHi,
- externalClock_txClocking,
-
- setLcr,
- lcr,
- setFlowControl,
- ctsFlowControl,
- xonFlowControl,
- xonChar,
- xoffChar,
- setTxTriState_setRts,
-
- txTriState_rts,
- setHskoa_setDtr,
-
- hskoa_dtr,
- setPrescaler,
- prescaler;
-
-
-
- u8 forwardingLength,
- reportHskiaChanges_dsrFlowControl,
-
-
- txAckThreshold,
- loopbackMode;
-
- u8 _txOn,
- _txOff,
- txFlush,
- txBreak,
- rxOn,
- rxOff,
- rxFlush,
- rxForward,
- returnStatus,
- resetDataToggle;
- } keyspan_usa67_portControlMessage;
- #define USA_DATABITS_5 0x00
- #define USA_DATABITS_6 0x01
- #define USA_DATABITS_7 0x02
- #define USA_DATABITS_8 0x03
- #define STOPBITS_5678_1 0x00
- #define STOPBITS_5_1p5 0x04
- #define STOPBITS_678_2 0x04
- #define USA_PARITY_NONE 0x00
- #define USA_PARITY_ODD 0x08
- #define USA_PARITY_EVEN 0x18
- #define PARITY_1 0x28
- #define PARITY_0 0x38
- typedef struct keyspan_usa67_portStatusMessage
- {
- u8 port,
- hskia_cts,
- gpia_dcd,
- _txOff,
- _txXoff,
- txAck,
- rxEnabled,
- controlResponse;
- } keyspan_usa67_portStatusMessage;
- #define RXERROR_OVERRUN 0x02
- #define RXERROR_PARITY 0x04
- #define RXERROR_FRAMING 0x08
- #define RXERROR_BREAK 0x10
- typedef struct keyspan_usa67_globalControlMessage
- {
- u8 port,
- sendGlobalStatus,
- resetStatusToggle,
- resetStatusCount;
- } keyspan_usa67_globalControlMessage;
- typedef struct keyspan_usa67_globalStatusMessage
- {
- u8 port,
- sendGlobalStatus,
- resetStatusCount;
- } keyspan_usa67_globalStatusMessage;
- typedef struct keyspan_usa67_globalDebugMessage
- {
- u8 port,
- a,
- b,
- c,
- d;
- } keyspan_usa67_globalDebugMessage;
- #define MAX_DATA_LEN 64
- #define STATUS_UPDATE_INTERVAL 16
- #define STATUS_RATION 10
- #endif
|