Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #define SUSBCRequest_SetBaudRateParityAndStopBits       1
0003 #define SUSBCR_SBR_MASK             0xFF00
0004 #define SUSBCR_SBR_1200             0x0100
0005 #define SUSBCR_SBR_9600             0x0200
0006 #define SUSBCR_SBR_19200            0x0400
0007 #define SUSBCR_SBR_28800            0x0800
0008 #define SUSBCR_SBR_38400            0x1000
0009 #define SUSBCR_SBR_57600            0x2000
0010 #define SUSBCR_SBR_115200           0x4000
0011 
0012 #define SUSBCR_SPASB_MASK           0x0070
0013 #define SUSBCR_SPASB_NoParity           0x0010
0014 #define SUSBCR_SPASB_OddParity          0x0020
0015 #define SUSBCR_SPASB_EvenParity         0x0040
0016 
0017 #define SUSBCR_SPASB_STPMASK            0x0003
0018 #define SUSBCR_SPASB_1StopBit           0x0001
0019 #define SUSBCR_SPASB_2StopBits          0x0002
0020 
0021 #define SUSBCRequest_SetStatusLinesOrQueues 2
0022 #define SUSBCR_SSL_SETRTS           0x0001
0023 #define SUSBCR_SSL_CLRRTS           0x0002
0024 #define SUSBCR_SSL_SETDTR           0x0004
0025 #define SUSBCR_SSL_CLRDTR           0x0010
0026 
0027 /* Kill the pending/current writes to the comm port. */
0028 #define SUSBCR_SSL_PURGE_TXABORT        0x0100
0029 /* Kill the pending/current reads to the comm port. */
0030 #define SUSBCR_SSL_PURGE_RXABORT        0x0200
0031 /* Kill the transmit queue if there. */
0032 #define SUSBCR_SSL_PURGE_TXCLEAR        0x0400
0033 /* Kill the typeahead buffer if there. */
0034 #define SUSBCR_SSL_PURGE_RXCLEAR        0x0800
0035 
0036 #define SUSBCRequest_GetStatusLineState     4
0037 /* Any Character received */
0038 #define SUSBCR_GSL_RXCHAR           0x0001
0039 /* Transmitt Queue Empty */
0040 #define SUSBCR_GSL_TXEMPTY          0x0004
0041 /* CTS changed state */
0042 #define SUSBCR_GSL_CTS              0x0008
0043 /* DSR changed state */
0044 #define SUSBCR_GSL_DSR              0x0010
0045 /* RLSD changed state */
0046 #define SUSBCR_GSL_RLSD             0x0020
0047 /* BREAK received */
0048 #define SUSBCR_GSL_BREAK            0x0040
0049 /* Line status error occurred */
0050 #define SUSBCR_GSL_ERR              0x0080
0051 /* Ring signal detected */
0052 #define SUSBCR_GSL_RING             0x0100
0053 
0054 #define SUSBCRequest_Misc           8
0055 /* use a predefined reset sequence */
0056 #define SUSBCR_MSC_ResetReader          0x0001
0057 /* use a predefined sequence to reset the internal queues */
0058 #define SUSBCR_MSC_ResetAllQueues       0x0002
0059 
0060 #define SUSBCRequest_GetMisc            0x10
0061 
0062 /*
0063  * get the firmware version from device, coded like this 0xHHLLBBPP with
0064  * HH = Firmware Version High Byte
0065  * LL = Firmware Version Low Byte
0066  * BB = Build Number
0067  * PP = Further Attributes
0068  */
0069 #define SUSBCR_MSC_GetFWVersion         0x0001
0070 
0071 /*
0072  * get the hardware version from device coded like this 0xHHLLPPRR with
0073  * HH = Software Version High Byte
0074  * LL = Software Version Low Byte
0075  * PP = Further Attributes
0076  * RR = Reserved for the hardware ID
0077  */
0078 #define SUSBCR_MSC_GetHWVersion         0x0002