1.configurationchangeswhichmustberequestedbysetting thecorresponding"set"flag(andshouldonlyberequested whennecessary,toreduceoverheadontheUSA28):
*/
u8 setBaudRate, // 0=don't set, 1=baudLo/Hi, 2=115.2K, 3=230.4K
baudLo, // host does baud divisor calculation
baudHi; // baudHi is only used for first port (gives lower rates)
/* 3.configurationdatawhichissimplyusedasis(nooverhead, butmustbecorrectineveryhostmessage).
*/
u8 forwardingLength, // forward when this number of chars available
forwardMs, // forward this many ms after last rx data
breakThreshold, // specified in ms, 1-255 (see note below)
xonChar, // specified in current character format
xoffChar; // specified in current character format
/* 4.commandswhichareflagsonly;theseareprocessedinorder (sothat,e.g.,ifboth_txOnand_txOffflagsareset,the portendsinaTX_OFFstate);anynon-zerovalueisrespected
*/
u8 _txOn, // enable transmitting (and continue if there's data)
_txOff, // stop transmitting
txFlush, // toss outbound data
txForceXoff, // pretend we've received XOFF
txBreak, // turn on break (leave on until txOn clears it)
rxOn, // turn on receiver
rxOff, // turn off receiver
rxFlush, // toss inbound data
rxForward, // forward all inbound data, NOW
returnStatus, // return current status n times (1 or 2)
resetDataToggle;// reset data toggle state to DATA0
};
struct keyspan_usa28_portStatusMessage
{
u8 port, // 0=first, 1=second, 2=global (see below)
cts,
dsr, // (not used in all products)
dcd,
ri, // (not used in all products)
_txOff, // port has been disabled (by host)
_txXoff, // port is in XOFF state (either host or RX XOFF)
dataLost, // count of lost chars; wraps; not guaranteed exact
rxEnabled, // as configured by rxOn/rxOff 1=on, 0=off
rxBreak, // 1=we're in break state
rs232invalid, // 1=no valid signals on rs-232 inputs
controlResponse;// 1=a control messages has been processed
};
// bit defines in txState #define TX_OFF 0x01 // requested by host txOff command #define TX_XOFF 0x02 // either real, or simulated by host
struct keyspan_usa28_globalControlMessage
{
u8 sendGlobalStatus, // 2=request for two status responses
resetStatusToggle, // 1=reset global status toggle
resetStatusCount; // a cycling value
};
struct keyspan_usa28_globalStatusMessage
{
u8 port, // 3
sendGlobalStatus, // from request, decremented
resetStatusCount; // as in request
};
struct keyspan_usa28_globalDebugMessage
{
u8 port, // 2
n, // typically a count/status byte
b; // typically a data byte
};
// ie: the maximum length of an EZUSB endpoint buffer #define MAX_DATA_LEN 64
// the parity bytes have only one significant bit #define RX_PARITY_BIT 0x04 #define TX_PARITY_BIT 0x01
// update status approx. 60 times a second (16.6666 ms) #define STATUS_UPDATE_INTERVAL 16
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.