Go to the documentation of this file.00001 #ifndef _DEV_TLC16C550_H_
00002 #define _DEV_TLC16C550_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 #include <sys/device.h>
00070 #include <dev/ace.h>
00071
00081
00082 #define ACE_MF_RTSSENSE 0x00000001UL
00083 #define ACE_MF_CTSCONTROL 0x00000002UL
00084 #define ACE_MF_DTRSENSE 0x00000004UL
00085 #define ACE_MF_DSRCONTROL 0x00000008UL
00086 #define ACE_MF_DCDCONTROL 0x00000010UL
00088 #define ACE_MF_RTSCONTROL 0x00000020UL
00089 #define ACE_MF_CTSSENSE 0x00000040UL
00090 #define ACE_MF_DTRCONTROL 0x00000080UL
00091 #define ACE_MF_DSRSENSE 0x00000100UL
00092 #define ACE_MF_DCDSENSE 0x00000200UL
00094 #define ACE_MF_SENSEMASK 0x0345
00095 #define ACE_MF_CONTROLMASK 0x00BC
00097 #define ACE_MF_XONXOFF 0x00000400UL
00099 #define ACE_MF_HALFDUPLEX 0x00000800UL
00101 #define ACE_MF_LOCALECHO 0x00010000UL
00102 #define ACE_MF_COOKEDMODE 0x00020000UL
00104 #define ACE_MF_NOBUFFER 0x00100000UL
00105 #define ACE_MF_LINEBUFFER 0x00200000UL
00106 #define ACE_MF_BUFFERMASK 0x00300000UL
00109 #define ACE_SF_RTSOFF 0x00000001UL
00110 #define ACE_SF_CTSOFF 0x00000002UL
00111 #define ACE_SF_DTROFF 0x00000004UL
00112 #define ACE_SF_DSROFF 0x00000008UL
00113 #define ACE_SF_DCDOFF 0x00000010UL
00115 #define ACE_SF_TXDISABLED 0x00000040UL
00116 #define ACE_SF_RXDISABLED 0x00000080UL
00118 #define ACE_HS_DCERTSCTS 0x00000003UL
00119 #define ACE_HS_DCEFULL 0x0000001FUL
00121 #define ACE_HS_DTERTSCTS 0x00000060UL
00122 #define ACE_HS_DTEFULL 0x000003E0UL
00124 #define ACE_HS_XONXOFF 0x00000400UL
00126 #ifndef ACE_CLOCK
00127 #define ACE_CLOCK 14745600UL
00128 #endif
00129
00130 #define ACE_FIFO_SIZE 16
00131
00132
00133 #ifdef ACE_HDX_LINE
00134 #undef ACE_HDX_LINE
00135 #endif
00136 #ifdef ACE_HDX_USE_RTS
00137 #define ACE_HDX_LINE MCR_RTS_MSK
00138 #endif
00139 #ifdef ACE_HDX_USE_DTR
00140 #define ACE_HDX_LINE MCR_DTR_MSK
00141 #endif
00142 #ifdef ACE_HDX_LINE
00143 #ifdef ACE_HDX_LINE_FLIP
00144 #define ACE_HDX_RECEIVE(base) *(uint8_t *) ((base) + ACE_MCR_OFS) &= ~ACE_HDX_LINE
00145 #define ACE_HDX_TRANSMIT(base) *(uint8_t *) ((base) + ACE_MCR_OFS) |= ACE_HDX_LINE
00146 #define ACE_HDX_IS_TRANSMIT(base) (*(uint8_t *) ((base) + ACE_MCR_OFS) & ACE_HDX_LINE)
00147 #else
00148 #define ACE_HDX_RECEIVE(base) *(uint8_t *) ((base) + ACE_MCR_OFS) |= ACE_HDX_LINE
00149 #define ACE_HDX_TRANSMIT(base) *(uint8_t *) ((base) + ACE_MCR_OFS) &= ~ACE_HDX_LINE
00150 #define ACE_HDX_IS_TRANSMIT(base) (!(*(uint8_t *) ((base) + ACE_MCR_OFS) & ACE_HDX_LINE))
00151 #endif
00152 #endif
00153
00157 typedef struct _ACEDCB ACEDCB;
00158
00163 struct _ACEDCB {
00165 NUTDEVICE *dev_next;
00166
00169 uint32_t dcb_rtimeout;
00170
00173 uint32_t dcb_wtimeout;
00174
00179 HANDLE dcb_tx_rdy;
00180
00185 HANDLE dcb_rx_rdy;
00186
00189 uint32_t dcb_modeflags;
00190
00193 uint8_t dcb_rfifo;
00194
00197 uint8_t dcb_wfifo;
00198 #ifdef ACE_HDX_LINE
00199
00201 unsigned int hdxByteTime;
00202
00205 unsigned int hdxOcrTime;
00206 #endif
00207 };
00208
00211 #endif