4 #include <devices/usb.h>
5 #include <exec/devices.h>
7 /* Products supported */
10 #define UCPR_SET_STATE 0x00 /* Enable / Disable */
11 #define UCPR_SET_BAUDRATE 0x01 /* (BAUD_RATE_GEN_FREQ / baudrate) */
12 #define UCPR_GET_BAUDRATE 0x02 /* (BAUD_RATE_GEN_FREQ / baudrate) */
13 #define UCPR_SET_BITS 0x03 /* 0x(0)(databits)(parity)(stopbits) */
14 #define UCPR_GET_BITS 0x04 /* 0x(0)(databits)(parity)(stopbits) */
16 #define UCPR_SET_BREAK 0x05 /* On / Off */
17 #define UCPR_GET_BREAK 0x06 /* On / Off */
18 #define UCPR_SET_CONTROL 0x07 /* Flow control line states */
19 #define UCPR_GET_CONTROL 0x08 /* Flow control line states */
20 #define UCPR_SET_MODEMCTL 0x13 /* Modem controls */
21 #define UCPR_GET_MODEMCTL 0x14 /* Modem controls */
22 #define UCPR_SET_MISC 0x19
23 #define UCPR_GET_MISC 0x1a
26 #define UART_ENABLE 0x0001
27 #define UART_DISABLE 0x0000
30 #define BAUD_RATE_GEN_FREQ 0x384000
33 #define BITS_PARITY_NONE 0x0000
34 #define BITS_PARITY_ODD 0x0010
35 #define BITS_PARITY_EVEN 0x0020
36 #define BITS_PARITY_MARK 0x0030
37 #define BITS_PARITY_SPACE 0x0040
39 #define BITS_STOP_1 0x0000
40 #define BITS_STOP_1_5 0x0001
41 #define BITS_STOP_2 0x0002
44 #define BREAK_ON 0x0000
45 #define BREAK_OFF 0x0001
48 #define UART_DTR 0x0001
49 #define UART_RTS 0x0002
50 #define UART_CTS 0x0010
51 #define UART_DSR 0x0020
52 #define UART_RING 0x0040
53 #define UART_DCD 0x0080
54 #define UART_WRITE_DTR 0x0100
55 #define UART_WRITE_RTS 0x0200
60 #define DEFREADBUFLEN 2048
61 #define NUMREADPIPES 16
63 struct UsbCDCSerialState
65 struct UsbSetupData uss_Req
;
71 struct Library nh_Library
; /* standard */
72 UWORD nh_Flags
; /* various flags */
74 struct Library
*nh_UtilityBase
; /* utility base */
76 struct NepSerDevBase
*nh_DevBase
; /* base of device created */
77 struct List nh_Units
; /* List of units available */
82 struct Library np_Library
; /* standard */
83 UWORD np_Flags
; /* various flags */
85 BPTR np_SegList
; /* device seglist */
86 struct NepSerialBase
*np_ClsBase
; /* pointer to class base */
87 struct Library
*np_UtilityBase
; /* cached utilitybase */
92 struct Unit ncp_Unit
; /* Unit structure */
93 ULONG ncp_UnitNo
; /* Unit number */
94 struct NepSerDevBase
*ncp_DevBase
; /* Device base */
95 struct Library
*ncp_Base
; /* Poseidon base */
96 struct PsdDevice
*ncp_Device
; /* Up linkage */
97 struct PsdConfig
*ncp_Config
; /* Up linkage */
98 struct PsdInterface
*ncp_Interface
; /* Up linkage */
99 struct Task
*ncp_ReadySigTask
; /* Task to send ready signal to */
100 LONG ncp_ReadySignal
; /* Signal to send when ready */
101 LONG ncp_AbortSignal
; /* Signal to abort write on */
102 struct Task
*ncp_Task
; /* Subtask */
103 struct MsgPort
*ncp_TaskMsgPort
; /* Message Port of Subtask */
105 struct PsdPipe
*ncp_EP0Pipe
; /* Endpoint 0 pipe */
106 struct PsdEndpoint
*ncp_EPOut
; /* OUT Endpoint */
107 struct PsdPipeStream
*ncp_EPOutStream
; /* OUT Endpoint stream */
108 struct PsdEndpoint
*ncp_EPIn
; /* IN Endpoint */
109 struct PsdPipeStream
*ncp_EPInStream
; /* IN Endpoint stream */
110 UWORD ncp_EPOutNum
; /* Endpoint OUT number */
111 UWORD ncp_EPInNum
; /* Endpoint IN number */
112 struct MsgPort
*ncp_DevMsgPort
; /* Message Port for IOParReq */
113 UWORD ncp_UnitProdID
; /* ProductID of unit */
114 UWORD ncp_UnitVendorID
; /* VendorID of unit */
115 UWORD ncp_UnitCfgNum
; /* Config of unit */
116 UWORD ncp_UnitIfNum
; /* Interface number */
117 UWORD ncp_UnitAltIfNum
; /* Alternate interface number */
118 BOOL ncp_DenyRequests
; /* Do not accept further IO requests */
119 BOOL ncp_DevSuspend
; /* suspend things */
121 struct IOExtSer
*ncp_WritePending
; /* write IORequest pending */
122 struct List ncp_ReadQueue
; /* List of read requests */
123 struct List ncp_WriteQueue
; /* List of write requests */
126 #endif /* SERIALCP210X_H */