ReactOS  0.4.14-dev-337-gf981a68
serial.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void SendString (LPSTR s)
 
void SetupSerial (ULONG port, ULONG baudrate)
 
BOOLEAN ConsoleInitSerial (void)
 
void ConsoleShutdownSerial (void)
 

Function Documentation

◆ ConsoleInitSerial()

BOOLEAN ConsoleInitSerial ( void  )

Definition at line 582 of file serial.c.

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 }
void(* PrintLogo)(BOOLEAN bShow)
Definition: hardware.h:47
void PrintGrafSerial(ULONG x, ULONG y, UCHAR c)
Definition: serial.c:340
#define TRUE
Definition: types.h:120
void SetWindowGeometry(PVOID pWindow)
Definition: hardware.c:915
void EmptyRingBuffer(void)
Definition: hardware.c:104
BOOLEAN Connect(USHORT xSize, USHORT ySize)
Definition: serial.c:563
void SaveGraphicsStateSerial(void)
Definition: serial.c:509
void(* FlushKeyboardQueue)(void)
Definition: hardware.h:61
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
ULONG GLOBAL_SCREEN_HEIGHT
Definition: hardware.c:62
void(* HideCursor)(void)
Definition: hardware.h:52
void HatchLineSerial(ULONG line)
Definition: serial.c:461
void CopyLineToSerial(USHORT dest, USHORT src)
Definition: serial.c:433
#define LEAVE_FUNC()
Definition: debug.h:43
WINDOW wWindowSerial[4]
Definition: serial.c:41
#define NONPAGEDPOOL
Definition: utils.h:306
#define FRAMEBUFFER_SIZE
Definition: precomp.h:31
void(* SetBackgroundColor)(ECOLORS)
Definition: hardware.h:54
void(* SetForegroundColor)(ECOLORS)
Definition: hardware.h:53
void(* ClrLine)(ULONG line)
Definition: hardware.h:44
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
OUTPUT_HANDLERS ohandlers
Definition: hardware.c:65
void PrintCursorSerial(BOOLEAN bForce)
Definition: serial.c:500
UCHAR(* GetKeyPolled)(void)
Definition: hardware.h:60
void(* PrintGraf)(ULONG x, ULONG y, UCHAR c)
Definition: hardware.h:42
INPUT_HANDLERS ihandlers
Definition: hardware.c:66
void(* PrintCursor)(BOOLEAN bForce)
Definition: hardware.h:48
void(* ShowCursor)(void)
Definition: hardware.h:51
void SetupSerial(ULONG port, ULONG baudrate)
Definition: serial.c:133
void RestoreGraphicsStateSerial(void)
Definition: serial.c:518
void ShowCursorSerial(void)
Definition: serial.c:383
void FlushKeyboardQueueSerial(void)
Definition: serial.c:554
void ClrLineSerial(ULONG line)
Definition: serial.c:471
void(* Flush)(void)
Definition: hardware.h:43
void(* SaveGraphicsState)(void)
Definition: hardware.h:49
void(* HatchLine)(ULONG line)
Definition: hardware.h:46
void PrintLogoSerial(BOOLEAN bShow)
Definition: serial.c:490
void(* CopyLineTo)(USHORT dest, USHORT src)
Definition: hardware.h:41
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 ENTER_FUNC()
Definition: debug.h:42
UCHAR GetKeyPolledSerial(void)
Definition: serial.c:528
void SetBackgroundColorSerial(ECOLORS col)
Definition: serial.c:330

Referenced by ConsoleInit().

◆ ConsoleShutdownSerial()

void ConsoleShutdownSerial ( void  )

Definition at line 641 of file serial.c.

642 {
643  ENTER_FUNC();
644 
645  Connect(80,25);
646 
648 
651 
652  LEAVE_FUNC();
653 }
BOOLEAN Connect(USHORT xSize, USHORT ySize)
Definition: serial.c:563
#define LEAVE_FUNC()
Definition: debug.h:43
PUCHAR pScreenBufferSerial
Definition: serial.c:49
void FlushSerialBuffer(void)
Definition: serial.c:122
void PICE_free(void *p)
Definition: utils.c:2222
#define ENTER_FUNC()
Definition: debug.h:42

Referenced by ConsoleShutdown().

◆ SendString()

void SendString ( LPSTR  s)

◆ SetupSerial()

void SetupSerial ( ULONG  port,
ULONG  baudrate 
)


Definition at line 133 of file serial.c.

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 }
void SerialSetOthers(ULONG Parity, ULONG Bits, ULONG StopBit)
Definition: serial.c:86
#define COM2BASE
Definition: serial_port.h:36
#define COM1BASE
Definition: serial_port.h:35
void SerialSetSpeed(ULONG baudrate)
Definition: serial.c:66
void FlushSerialBuffer(void)
Definition: serial.c:122
#define COM4BASE
Definition: serial_port.h:40
USHORT usSerialPortBase
Definition: serial.c:51
#define NO_PARITY
Definition: serial.c:89
unsigned short USHORT
Definition: pedump.c:61
#define COM3BASE
Definition: serial_port.h:39
USHORT port
Definition: uri.c:227

Referenced by ConsoleInitSerial().