ReactOS  0.4.14-dev-608-gd495a4f
serial.c
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1998-2001 Klaus P. Gerlicher
4 
5 Module Name:
6 
7  serial.c
8 
9 Abstract:
10 
11  serial debugger connection
12 
13 Environment:
14 
15  LINUX 2.2.X
16  Kernel mode only
17 
18 Author:
19 
20  Klaus P. Gerlicher
21 
22 Revision History:
23 
24  19-Aug-2000: created
25  15-Nov-2000: general cleanup of source files
26 
27 Copyright notice:
28 
29  This file may be distributed under the terms of the GNU Public License.
30 
31 --*/
32 #include "remods.h"
33 #include "precomp.h"
34 #include "serial_port.h"
35 
37 
38 
39 // used for SERIAL window creation
40 // NB: at the moment the terminal is 60 lines high.
42 {
43  {1,3,1,0,FALSE},
44  {5,8,1,0,FALSE},
45  {14,26,1,0,FALSE},
46  {41,18,1,0,FALSE}
47 };
48 
50 
52 
55 
58 
61 
63 // SerialSetSpeed()
64 //
66 void SerialSetSpeed(ULONG baudrate)
67 {
68  UCHAR c;
69  ULONG divisor;
70 
71  divisor = (ULONG) (115200L/baudrate);
72 
74  outportb((USHORT)(usSerialPortBase + LCR), (UCHAR)(c | 0x80)); // Set DLAB
75  outportb((USHORT)(usSerialPortBase + DLL), (UCHAR)(divisor & 0x00FF));
76  outportb((USHORT)(usSerialPortBase + DLH), (UCHAR)((divisor >> 8) & 0x00FF));
77  outportb((USHORT)(usSerialPortBase + LCR), c); // Reset DLAB
78 
79 }
80 
82 // SerialSetOthers()
83 //
84 // Set other communications parameters
85 //************************************************************************
86 void SerialSetOthers(ULONG Parity, ULONG Bits, ULONG StopBit)
87 {
88  ULONG setting;
89  UCHAR c;
90 
91  if (usSerialPortBase == 0) return ;
92  if (Bits < 5 || Bits > 8) return ;
93  if (StopBit != 1 && StopBit != 2) return ;
94  if (Parity != NO_PARITY && Parity != ODD_PARITY && Parity != EVEN_PARITY)
95  return;
96 
97  setting = Bits-5;
98  setting |= ((StopBit == 1) ? 0x00 : 0x04);
99  setting |= Parity;
100 
102  outportb((USHORT)(usSerialPortBase + LCR), (UCHAR)(c & ~0x80)); // Reset DLAB
103 
104  // no ints
106 
107  // clear FIFO and disable them
109 
111 
113 
114 
115  return ;
116 }
117 
119 // FlushSerialBuffer()
120 //
123 {
124  UCHAR c;
125 
126  while(SerialReadByte(&c));
127 }
128 
130 // SetupSerial()
131 //
133 void SetupSerial(ULONG port,ULONG baudrate)
134 {
136 
137  usSerialPortBase = ports[port-1];
139  SerialSetSpeed(baudrate);
140 
141  // clear out received bytes
142  // else we would think there's a terminal connected
144 }
145 
146 
148 // SerialReadByte()
149 //
150 // Output a character to the serial port
151 //************************************************************************
153 {
154  ULONG timeout;
155 
156  timeout = 0x00FFFFL;
157 
158  // Wait for transmitter to clear
159  while ((inportb((USHORT)(usSerialPortBase + LSR)) & RCVRDY) == 0)
160  if (!(--timeout))
161  {
162  return FALSE;
163  }
164 
165  *px = inportb((USHORT)(usSerialPortBase + RXR));
166 
167  return TRUE;
168 }
169 
171 // SerialSendByte()
172 //
173 // Output a character to the serial port
174 //************************************************************************
176 {
177  ULONG timeout;
178 
179  timeout = 0x00FFFFL;
180 
181  // Wait for transmitter to clear
182  while ((inportb((USHORT)(usSerialPortBase + LSR)) & XMTRDY) == 0)
183  if (!(--timeout))
184  {
185  return FALSE;
186  }
187 
189 
190  return TRUE;
191 }
192 
193 //************************************************************************
194 // CheckSum()
195 //
196 //************************************************************************
198 {
199  UCHAR ucCheckSum = 0;
200  ULONG i;
201  for(i=0;i<Len;i++)
202  {
203  ucCheckSum ^= *p++;
204  ucCheckSum += 1;
205  }
206 
207  return ucCheckSum;
208 }
209 
210 
212 // ReadPacket()
213 //
216 {
217  return TRUE;
218 }
219 
220 
222 // SendPacket()
223 //
226 {
227  PUCHAR pHeader = (PUCHAR)&p->header;
228  ULONG i;
229  UCHAR c;
230  ULONG timeout;
231 
232  do
233  {
234  timeout = 10;
235  pHeader = (PUCHAR)&p->header;
236  for(i=0;i<(sizeof(SERIAL_PACKET_HEADER)+p->header.packet_size);i++)
237  {
238  if(!SerialSendByte(*pHeader++))
239  {
240  return FALSE;
241  }
242  }
243 
244  do
245  {
246  c = 0;
247  SerialReadByte(&c);
248  if(c != ACK)
249  ucLastKeyRead = c;
250  }while(c != ACK && timeout--);
251 
252  }while(c != ACK);
253 
254  return TRUE;
255 }
256 
258 // SendPacketTimeout()
259 //
262 {
263  PUCHAR pHeader = (PUCHAR)&p->header;
264  ULONG i;
265  UCHAR c;
266  ULONG timeout = 20;
267  BOOLEAN bResult = TRUE;
268 
269  pHeader = (PUCHAR)&p->header;
270  for(i=0;i<(sizeof(SERIAL_PACKET_HEADER)+p->header.packet_size);i++)
271  {
272  if(!SerialSendByte(*pHeader++))
273  {
274  return FALSE;
275  }
276  }
277 
278  do
279  {
280  c = 0xFF;
281  SerialReadByte(&c);
282  }while(c != ACK && timeout--);
283 
284  if(c != ACK)
285  bResult = FALSE;
286 
287  return bResult;
288 }
289 
290 
291 //************************************************************************
292 // AssemblePacket()
293 //
294 //************************************************************************
296 {
298  ULONG ulCheckSum;
299 
301 
302  // fill in header
303  p->header.packet_chksum = CheckSum(pData,ulSize);
304  p->header.packet_size = ulSize;
305  p->header.packet_header_chksum = 0;
306  ulCheckSum = (ULONG)CheckSum((PUCHAR)p,sizeof(SERIAL_PACKET_HEADER));
307  p->header.packet_header_chksum = ulCheckSum;
308  // attach data to packet
309  PICE_memcpy(p->data,pData,ulSize);
310 
311  return p;
312 }
313 
314 
315 // OUTPUT handlers
316 
317 //*************************************************************************
318 // SetForegroundColorVga()
319 //
320 //*************************************************************************
322 {
323  eForegroundColor = col;
324 }
325 
326 //*************************************************************************
327 // SetBackgroundColorVga()
328 //
329 //*************************************************************************
331 {
332  eBackgroundColor = col;
333 }
334 
335 
336 //*************************************************************************
337 // PrintGrafSerial()
338 //
339 //*************************************************************************
341 {
342  // put this into memory
344 
345  // put this into cache
346  if(ulFlushBufferPos == 0)
347  {
348  g_x = x;
349  g_y = y;
350  }
351 
353 }
354 
355 //*************************************************************************
356 // FlushSerial()
357 //
358 //*************************************************************************
359 void FlushSerial(void)
360 {
363 
365  pPrint->type = PACKET_TYPE_PRINT;
366  pPrint->x = g_x;
367  pPrint->y = g_y;
368  pPrint->fgcol = eForegroundColor;
369  pPrint->bkcol = eBackgroundColor;
372  ulFlushBufferPos = 0;
373 
375  SendPacket(p);
376 }
377 
378 //*************************************************************************
379 // ShowCursorSerial()
380 //
381 // show hardware cursor
382 //*************************************************************************
384 {
387 
388  ENTER_FUNC();
389 
391 
393  pCursor->type = PACKET_TYPE_CURSOR;
394  pCursor->state = (UCHAR)TRUE;
395  pCursor->x = (UCHAR)wWindow[OUTPUT_WINDOW].usCurX;
396  pCursor->y = (UCHAR)wWindow[OUTPUT_WINDOW].usCurY;
397 
398  p = AssemblePacket((PUCHAR)pCursor,sizeof(SERIAL_DATA_PACKET_CURSOR));
399  SendPacket(p);
400 
401  LEAVE_FUNC();
402 }
403 
404 //*************************************************************************
405 // HideCursorSerial()
406 //
407 // hide hardware cursor
408 //*************************************************************************
410 {
413 
414  ENTER_FUNC();
415 
417 
419  pCursor->type = PACKET_TYPE_CURSOR;
420  pCursor->state = (UCHAR)TRUE;
421 
422  p = AssemblePacket((PUCHAR)pCursor,sizeof(SERIAL_DATA_PACKET_CURSOR));
423  SendPacket(p);
424 
425  LEAVE_FUNC();
426 }
427 
428 //*************************************************************************
429 // CopyLineToSerial()
430 //
431 // copy a line from src to dest
432 //*************************************************************************
434 {
435  NOT_IMPLEMENTED();
436 }
437 
438 //*************************************************************************
439 // InvertLineSerial()
440 //
441 // invert a line on the screen
442 //*************************************************************************
444 {
445  PSERIAL_DATA_PACKET_INVERTLINE pInvertLine;
447 
448  pInvertLine = (PSERIAL_DATA_PACKET_INVERTLINE)packet;
449  pInvertLine->type = PACKET_TYPE_INVERTLINE;
450  pInvertLine->line = line;
451 
452  p = AssemblePacket((PUCHAR)pInvertLine,sizeof(SERIAL_DATA_PACKET_INVERTLINE));
453  SendPacket(p);
454 }
455 
456 //*************************************************************************
457 // HatchLineSerial()
458 //
459 // hatches a line on the screen
460 //*************************************************************************
462 {
463  NOT_IMPLEMENTED();
464 }
465 
466 //*************************************************************************
467 // ClrLineSerial()
468 //
469 // clear a line on the screen
470 //*************************************************************************
472 {
475 
477  pClrLine->type = PACKET_TYPE_CLRLINE;
478  pClrLine->fgcol = eForegroundColor;
479  pClrLine->bkcol = eBackgroundColor;
480  pClrLine->line = line;
481 
482  p = AssemblePacket((PUCHAR)pClrLine,sizeof(SERIAL_DATA_PACKET_CLRLINE));
483  SendPacket(p);
484 }
485 
486 //*************************************************************************
487 // PrintLogoSerial()
488 //
489 //*************************************************************************
491 {
492  NOT_IMPLEMENTED();
493 }
494 
495 //*************************************************************************
496 // PrintCursorSerial()
497 //
498 // emulate a blinking cursor block
499 //*************************************************************************
501 {
502  NOT_IMPLEMENTED();
503 }
504 
505 //*************************************************************************
506 // SaveGraphicsStateSerial()
507 //
508 //*************************************************************************
510 {
511  // not implemented
512 }
513 
514 //*************************************************************************
515 // RestoreGraphicsStateSerial()
516 //
517 //*************************************************************************
519 {
520  // not implemented
521 }
522 
523 // INPUT handlers
524 //*************************************************************************
525 // GetKeyPolledSerial()
526 //
527 //*************************************************************************
529 {
530  UCHAR ucResult;
533 
535  pPoll->type = PACKET_TYPE_POLL;
538  pPoll->build_number = PICE_BUILD;
539 
541  SendPacket(p);
542 
543  ucResult = ucLastKeyRead;
544 
545  ucLastKeyRead = 0;
546 
547  return ucResult;
548 }
549 
550 //*************************************************************************
551 // FlushKeyboardQueueSerial()
552 //
553 //*************************************************************************
555 {
556  // not implemented
557 }
558 
559 //*************************************************************************
560 // Connect()
561 //
562 //*************************************************************************
564 {
567 
569  pConnect->type = PACKET_TYPE_CONNECT;
570  pConnect->xsize = xSize;
571  pConnect->ysize = ySize;
572 
573  p = AssemblePacket((PUCHAR)pConnect,sizeof(SERIAL_DATA_PACKET_CONNECT));
574  return SendPacketTimeout(p);
575 }
576 
577 //*************************************************************************
578 // ConsoleInitSerial()
579 //
580 // init terminal screen
581 //*************************************************************************
583 {
584  BOOLEAN bResult = FALSE;
585 
586  ENTER_FUNC();
587 
602 
605 
607 
608  GLOBAL_SCREEN_WIDTH = 80;
610 
612 
614  {
615  bResult = TRUE;
616 
617  EmptyRingBuffer();
618 
619  SetupSerial(1,115200);
620 
621  // connect to terminal, if none's there, we give up
623 
624  if(bResult)
625  {
627  }
628  }
629 
630  LEAVE_FUNC();
631 
632  return bResult;
633 }
634 
635 
636 //*************************************************************************
637 // ConsoleShutdownSerial()
638 //
639 // exit terminal screen
640 //*************************************************************************
642 {
643  ENTER_FUNC();
644 
645  Connect(80,25);
646 
648 
651 
652  LEAVE_FUNC();
653 }
654 
655 
656 
void(* PrintLogo)(BOOLEAN bShow)
Definition: hardware.h:47
struct _SERIAL_DATA_PACKET_INVERTLINE * PSERIAL_DATA_PACKET_INVERTLINE
BOOLEAN bCursorEnabled
Definition: hardware.c:51
void SerialSetOthers(ULONG Parity, ULONG Bits, ULONG StopBit)
Definition: serial.c:86
void PrintGrafSerial(ULONG x, ULONG y, UCHAR c)
Definition: serial.c:340
return
Definition: dirsup.c:529
#define PACKET_TYPE_POLL
Definition: shared.h:193
#define TRUE
Definition: types.h:120
UCHAR assemble_packet[_PAGE_SIZE]
Definition: serial.c:54
#define PACKET_TYPE_PRINT
Definition: shared.h:162
void SetWindowGeometry(PVOID pWindow)
Definition: hardware.c:915
UCHAR inportb(PUCHAR port)
Definition: utils.c:2174
#define COM2BASE
Definition: serial_port.h:36
void EmptyRingBuffer(void)
Definition: hardware.c:104
BOOLEAN Connect(USHORT xSize, USHORT ySize)
Definition: serial.c:563
void SaveGraphicsStateSerial(void)
Definition: serial.c:509
#define COM1BASE
Definition: serial_port.h:35
void(* FlushKeyboardQueue)(void)
Definition: hardware.h:61
struct _SERIAL_DATA_PACKET_CLRLINE * PSERIAL_DATA_PACKET_CLRLINE
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
#define TXR
Definition: serial_port.h:60
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG GLOBAL_SCREEN_HEIGHT
Definition: hardware.c:62
USHORT PICE_strlen(const char *s)
Definition: utils.c:547
void(* HideCursor)(void)
Definition: hardware.h:52
void HatchLineSerial(ULONG line)
Definition: serial.c:461
BOOLEAN SendPacketTimeout(PSERIAL_PACKET p)
Definition: serial.c:261
void CopyLineToSerial(USHORT dest, USHORT src)
Definition: serial.c:433
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define LEAVE_FUNC()
Definition: debug.h:43
#define PICE_MAJOR_VERSION
Definition: pice_ver.h:32
Definition: dhcpd.h:245
BOOLEAN ConsoleInitSerial(void)
Definition: serial.c:582
char * LPSTR
Definition: xmlstorage.h:182
WINDOW wWindowSerial[4]
Definition: serial.c:41
GLbitfield GLuint64 timeout
Definition: glext.h:7164
#define NONPAGEDPOOL
Definition: utils.h:306
char * PICE_strcpy(char *s1, char *s2)
Definition: utils.c:302
void SerialSetSpeed(ULONG baudrate)
Definition: serial.c:66
#define FRAMEBUFFER_SIZE
Definition: precomp.h:31
void(* SetBackgroundColor)(ECOLORS)
Definition: hardware.h:54
#define ODD_PARITY
Definition: serial.c:90
void(* SetForegroundColor)(ECOLORS)
Definition: hardware.h:53
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct _SERIAL_DATA_PACKET_POLL * PSERIAL_DATA_PACKET_POLL
struct _SERIAL_PACKET_HEADER SERIAL_PACKET_HEADER
#define PICE_MINOR_VERSION
Definition: pice_ver.h:33
#define PACKET_TYPE_CLRLINE
Definition: shared.h:154
#define RTS
Definition: serial_port.h:127
void(* ClrLine)(ULONG line)
Definition: hardware.h:44
#define IER
Definition: serial_port.h:62
BOOLEAN SendPacket(PSERIAL_PACKET p)
Definition: serial.c:225
void(* RestoreGraphicsState)(void)
Definition: hardware.h:50
unsigned char BOOLEAN
PUCHAR pScreenBufferSerial
Definition: serial.c:49
void * PICE_malloc(size_t numBytes, BOOLEAN fromPaged)
Definition: utils.c:2212
Definition: parser.c:48
void FlushSerialBuffer(void)
Definition: serial.c:122
WINDOW wWindow[4]
Definition: hardware.c:59
#define LSR
Definition: serial_port.h:67
OUTPUT_HANDLERS ohandlers
Definition: hardware.c:65
void ConsoleShutdownSerial(void)
Definition: serial.c:641
struct _SERIAL_DATA_PACKET_CURSOR * PSERIAL_DATA_PACKET_CURSOR
void PrintCursorSerial(BOOLEAN bForce)
Definition: serial.c:500
UCHAR(* GetKeyPolled)(void)
Definition: hardware.h:60
ULONG ulFlushBufferPos
Definition: serial.c:57
BOOLEAN SerialReadByte(PUCHAR px)
Definition: serial.c:152
#define COM4BASE
Definition: serial_port.h:40
Definition: dhcpd.h:135
void outportb(PUCHAR port, UCHAR data)
Definition: utils.c:2154
void(* PrintGraf)(ULONG x, ULONG y, UCHAR c)
Definition: hardware.h:42
INPUT_HANDLERS ihandlers
Definition: hardware.c:66
struct _SERIAL_PACKET * PSERIAL_PACKET
#define _PAGE_SIZE
Definition: utils.h:269
#define BLACK
#define MCR
Definition: serial_port.h:66
void(* PrintCursor)(BOOLEAN bForce)
Definition: hardware.h:48
#define RCVRDY
Definition: serial_port.h:104
UCHAR g_x
Definition: serial.c:56
ECOLORS eBackgroundColor
Definition: serial.c:60
const GLubyte * c
Definition: glext.h:8905
void(* ShowCursor)(void)
Definition: hardware.h:51
enum _ECOLORS ECOLORS
USHORT usSerialPortBase
Definition: serial.c:51
UCHAR CheckSum(LPSTR p, ULONG Len)
Definition: serial.c:197
void PICE_free(void *p)
Definition: utils.c:2222
#define Len
Definition: deflate.h:82
void PICE_memcpy(void *t, void *s, int sz)
Definition: utils.c:239
#define LCR
Definition: serial_port.h:65
UCHAR g_y
Definition: serial.c:56
void SetupSerial(ULONG port, ULONG baudrate)
Definition: serial.c:133
#define PICE_BUILD
Definition: pice_ver.h:36
#define PACKET_TYPE_CONNECT
Definition: shared.h:172
#define XMTRDY
Definition: serial_port.h:109
unsigned char UCHAR
Definition: xmlstorage.h:181
void RestoreGraphicsStateSerial(void)
Definition: serial.c:518
char line[200]
Definition: main.c:97
void ShowCursorSerial(void)
Definition: serial.c:383
#define WHITE
#define PACKET_TYPE_INVERTLINE
Definition: shared.h:186
static const WCHAR L[]
Definition: oid.c:1250
void FlushKeyboardQueueSerial(void)
Definition: serial.c:554
PSERIAL_PACKET AssemblePacket(PUCHAR pData, ULONG ulSize)
Definition: serial.c:295
#define DLH
Definition: serial_port.h:70
void ClrLineSerial(ULONG line)
Definition: serial.c:471
void(* Flush)(void)
Definition: hardware.h:43
void(* SaveGraphicsState)(void)
Definition: hardware.h:49
GLenum src
Definition: glext.h:6340
void(* HatchLine)(ULONG line)
Definition: hardware.h:46
GLuint divisor
Definition: glext.h:6313
struct _SERIAL_DATA_PACKET_CONNECT * PSERIAL_DATA_PACKET_CONNECT
#define NO_PARITY
Definition: serial.c:89
void PrintLogoSerial(BOOLEAN bShow)
Definition: serial.c:490
unsigned short USHORT
Definition: pedump.c:61
#define EVEN_PARITY
Definition: serial.c:91
UCHAR flush_buffer[_PAGE_SIZE]
Definition: serial.c:56
#define COM3BASE
Definition: serial_port.h:39
void(* CopyLineTo)(USHORT dest, USHORT src)
Definition: hardware.h:41
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void HideCursorSerial(void)
Definition: serial.c:409
void(* InvertLine)(ULONG line)
Definition: hardware.h:45
void InvertLineSerial(ULONG line)
Definition: serial.c:443
void SetForegroundColorSerial(ECOLORS col)
Definition: serial.c:321
void FlushSerial(void)
Definition: serial.c:359
#define RXR
Definition: serial_port.h:61
#define c
Definition: ke_i.h:80
BOOLEAN ReadPacket(PSERIAL_PACKET p)
Definition: serial.c:215
unsigned int ULONG
Definition: retypes.h:1
#define ENTER_FUNC()
Definition: debug.h:42
static char * dest
Definition: rtl.c:135
#define DTR
Definition: serial_port.h:126
struct _SERIAL_DATA_PACKET_PRINT * PSERIAL_DATA_PACKET_PRINT
GLfloat GLfloat p
Definition: glext.h:8902
UCHAR GetKeyPolledSerial(void)
Definition: serial.c:528
BOOLEAN SerialSendByte(UCHAR x)
Definition: serial.c:175
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
void SetBackgroundColorSerial(ECOLORS col)
Definition: serial.c:330
#define FCR
Definition: serial_port.h:64
ECOLORS eForegroundColor
Definition: serial.c:60
USHORT port
Definition: uri.c:228
#define DLL
Definition: serial_port.h:69
#define ACK
Definition: shared.h:126
UCHAR ucLastKeyRead
Definition: serial.c:59
#define NOT_IMPLEMENTED()
Definition: hardware.h:153
#define PACKET_TYPE_CURSOR
Definition: shared.h:179