📄 disi.h
字号:
/* SIOCPARITY Parity Error *//* SIOCOVERRUN Overrun of buffers *//* SIOCCDLOST Carrier Detect Lost *//* SIOCMARK Idle Line Condition *//* *//* And additional codes: *//*---------------------------------------------------------------------*/#define SIOCCTSLOST 0x00000100 /* Clear To Send has been lost */#define SIOCNAFRAME 0x00000200 /* Frame not divisible by 8 */#define SIOCABFRAME 0x00000400 /* Frame aborted */#define SIOCCRCERR 0x00000800 /* CRC error */#define SIOCCTS 0x00001000 /* Clear To Send has been found */#define SIOCCD 0x00002000 /* Carrier Detect has been detected*/#define SIOCFLAGS 0x00004000 /* Non Idle Line Condition detected*//*---------------------------------------------------------------------*//* *//* static void UDataCnf( *//* Uid uid; Upper layer reference *//* mblk_t * mbp; Message block pointer *//* unsigned long b_flags;) Bitwise info associated to buf *//* ); *//* *//* UDataCnf is called by the device dependent lower level code to *//* confirm to the upper level serial driver that the data sent using *//* SerialSend call has been transmitted. uid is upper level serial *//* driver's reference pointer passed to the driver during the *//* SerialOpen of the channel, mbp points to the message block sent *//* using SerialSend call. b_flags are the status flags associated with *//* this message block. This function should unblock any function that *//* was waiting for data to be sent and that function should do what *//* ever maintenance is necessary on the message block (free it or *//* reuse it). *//* SIOCCTSLOST Clear To Send has been lost *//* *//* b_flags can be one of the following: *//*---------------------------------------------------------------------*/#define SIOCUNDERRUN 0x00008000 /* Tx underrun */#define SIOCABORT 0x00010000 /* Tx aborted *//*---------------------------------------------------------------------*//* *//* static void UCtlCnf( *//* Uid uid; Upper layer reference *//* unsigned long cmd; Control command *//* ); *//* *//* UCtlCnf is used to confirm the completion of the control command *//* sent via SerialIoctl call. uid is upper level serial driver's *//* pointer reference passed to the driver during the SerialOpen of the *//* channel. cmd refers to the command being confirmed. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* *//* static mblk_t * UEsballoc( *//* char *bp; Pointer to buffer *//* long len; Length of the buffer *//* long pri; Priority *//* frtn_t *frtn; Free routine structure *//* ); *//* *//* *//* typedef struct { *//* void (*free_func)(); *//* void *free_arg; *//* } frtn_t; *//* *//* UEsballoc returns a message block triplet by attaching the *//* externally supplied buffer to a message block and data block (See *//* Streams or pNA for more details). bp points to the externally *//* supplied buffer and len specifies the number of bytes in the buffer.*//* pri specifies the priority for message block allocation. frtn is a *//* pointer to the free structure of type frtn_t: *//* *//* The function pointed to by free_func will be called when the *//* caller supplied buffer needs to be freed with the argument *//* pointed to by free_arg. (free_arg in most cases will be the pointer *//* to the externally supplied buffer.) The function pointed to by *//* free_func must be supplied by the caller. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* *//* static mblk_t * UAllocb( *//* long size; Size of the buffer *//* long pri; Priority *//* ); *//* *//* UAllocb returns a message block triplet of size and at priority pri *//* or a NULL if no buffer or message block could be found. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* *//* static void UFreemsg( *//* mblk_t *mbp; Pointer to message block *//* ); *//* *//* UFreemsg call is used by the function pointed to by frnt to free a *//* message block triplet list specified by the parameter mbp for this *//* specific message block pool. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* The Mode can be: *//*---------------------------------------------------------------------*/#define SIOCASYNC 0x00000000 /* async mode */#define SIOCSYNC 0x00000001 /* sync HDLC - asyn if not set */#define SIOCPOLLED 0x00000002 /* poll - interrupt if not set */#define SIOCLOOPBACK 0x00000004 /* local loop back *//*---------------------------------------------------------------------*//* The LineMode can be (MULTIDROP can be OR'ed with HALFD or FULLD): *//*---------------------------------------------------------------------*/#define HALFD 0x01 /* Half-Duplex */#define FULLD 0x02 /* Full-Duplex */#define MULTIDROP 0x04 /* Multi-Drop lines*//*---------------------------------------------------------------------*//* The CharSize can be: *//*---------------------------------------------------------------------*/#define SCS5 0x05 /* 5 bits per character */#define SCS6 0x06 /* 6 bits per character */#define SCS7 0x07 /* 7 bits per character */#define SCS8 0x08 /* 8 bits per character *//*---------------------------------------------------------------------*//* The Flags can be: *//*---------------------------------------------------------------------*/#define CANON 0x00000001 /* Canonical mode */#define C2STOPB 0x00000002 /* Send two stop bits, else one.*/#define SPARENB 0x00000004 /* Parity enable.*/#define SPARODD 0x00000008 /* Odd parity, else even.*/#define HWFC 0x00000010 /* Hardware flow control on.*/#define SWFC 0x00000020 /* Software flow control on.*/#define SWDCD 0x00000040 /* Software data carrier detect */#define LECHO 0x00000080 /* Enable local echo */#define SBRKINT 0x00000100 /* Interrupt on reception of Break*/#define DCDINT 0x00000200 /* Interrupt on loss of DCD */#define FLAGS_MASK 0x000003FF /* Mask of valid flag bits *//*---------------------------------------------------------------------*//* LChar can be any 8 bit value that the user wants to use as a *//* character that when received will cause an interrupt that will *//* cause the UDataInd function to be called *//* *//* LFlags is a bit field that will control the characters use.as *//* ENDOFTABLE will mark an entry not valid and should be the last entry*//* in the table. If table has 2 entries none will have this bit set. *//* If REJECTCHAR is set the character does not become part of the *//* buffer, an interrupt will be generated but the buffer will not be *//* closed (characters will still be received) If REJECTCHAR is not set *//* then an interrupt will be generated, the character will be the last *//* character in the buffer and the buffer will be closed then another *//* buffer will be used to receive data *//*---------------------------------------------------------------------*/#define ENDOFTABLE 0x80 /* non valid last entry in table */#define REJECTCHAR 0x40 /* character is rejected *//*---------------------------------------------------------------------*//* If PARENB is set, parity generation and detection is enabled and a *//* parity bit is added to each character. If parity is enabled, the *//* PARODD flag specifies odd parity if set, otherwise even parity is *//* used. *//* *//* If HWFC is set, the channel will use CTS/RTS flow control. This bit *//* has no effect if the channel does not support hardware flow control.*//* *//* If the SWFC bit is set, XON/XOFF flow control is enabled. *//* *//* If SWDCD is set, the channel behaves as if the hardware data *//* carrier detect (DCD) signal is always asserted. If SWDCD is clear, *//* the channel is enabled and disabled by DCD. *//* *//* If BRKINT is set, the channel will make an exception callback if a *//* break character is received. If DCDINT is set, the channel will *//* make an exception callback upon loss of the DCD signal. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* HDLC Address filtering: *//* There must always be 4 values in the Address[4] field of the HDLC *//* configuration structure because HDLC is transparent so no single *//* character can serve as an end of list there. The AddressMask *//* field determines which of the possible 16 bits (of each Address[i])*//* are used to filter the addresses of the received frames. 0 means *//* no filtering, 0x00FF means 8 bits addresses, 0xFFFF means 16 bits *//* addresses. Other masks are allowed to filter on fewer than 8 or 16 *//* bits: for example the mask 0x00F0 with Address[i] set to 0x00C0 *//* will cause the driver to receive only frames that have their first *//* byte starting with 0xC0 to 0xCF. *//*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* TxClock and RxClock can be: *//*---------------------------------------------------------------------*/#define CLK_INTERNAL 0x01 /* internal clock (transmit only) */#define CLK_EXTERNAL 0x02 /* external supplied clock */#define CLK_DPLL 0x04 /* Digital Phase Lock Loop used */#define CLK_INVERT 0x08 /* transmit DPLL invert data *//*---------------------------------------------------------------------*//* Modulation can be: *//*---------------------------------------------------------------------*/#define MOD_NRZ 0x01#define MOD_NRZI_MARK 0x02#define MOD_NRZI_SPACE 0x03#define MOD_FM0 0x04#define MOD_FM1 0x05#define MOD_MANCHESTER 0x06#define MOD_DMANCHESTER 0x07/*---------------------------------------------------------------------*//* Crc32Bits can be: *//*---------------------------------------------------------------------*/#define CRC32 0x01 /* 32 bit CRC else 16 bit CRC *//*---------------------------------------------------------------------*//* error codes returned: *//*---------------------------------------------------------------------*/#define SIOCAOPEN 0x10010401 /* channel already open */#define SIOCBADCHANNELNUM 0x10010402 /* channel does not exist. */#define SIOCCFGNOTSUPPORTED 0x10010403 /* config not supported */#define SIOCNOTOPEN 0x10010404 /* channel is not open */#define SIOCINVALID 0x10010405 /* cmd is not valid */#define SIOCBADARG 0x10010406 /* argument is not valid */#define SIOCOPERATIONNOTSUP 0x10010407 /* operation is not supported */#define SIOCOQFULL 0x10010408 /* output que is full failed */#define SIOCBADBAUD 0x10010409 /* baud rate not supported */#define SIOCBADMINCHAR 0x1001040A /* MinChar > RBuffSize */#define SIOCWAITING 0x1001040B /* still waiting for previous */ /* command to complete */#define SIOCNOTINIT 0x1001040C /* driver not initialized */#define SIOCINITFAILED 0x1001040D#ifdef GHS#pragma pack()#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -