Lukas Piwowarski / SerialTerminal

Dependents:   IMP_projekt

Embed: (wiki syntax)

« Back to documentation index

SerialTerminal Class Reference

SerialTerminal Class Reference

Control and display on an ANSI/VT100 Terminal (puTTy or similar...) More...

#include <SerialTerminal.h>

Public Member Functions

 SerialTerminal (PinName tx, PinName rx, int baudrate=9600)
 Create the Terminal interface.
int putc (int c)
 Write a character to the terminal.
int printf (const char *format,...)
 Write a formated string to the terminal.
void locate (int column, int row)
 Locate to a screen column and row.
void cls ()
 Clear the screen and locate to 0,0.
void foreground (int colour)
 Set the foreground colour.
void background (int colour)
 Set the background colour.
void hideCursor ()
 Hide Cursor from terminal.
void showCursor ()
 Hide Cursor from terminal.
void hide_cursor ()
 Hides cursor.
void show_cursor ()
 Enables cursor.

Detailed Description

Control and display on an ANSI/VT100 Terminal (puTTy or similar...)

This allows you to control an ANSI serial terminal Set TX pin and RX . also spesify bauderate if needed different than default 9600

Definition at line 11 of file SerialTerminal.h.


Constructor & Destructor Documentation

SerialTerminal ( PinName  tx,
PinName  rx,
int  baudrate = 9600 
)

Create the Terminal interface.

Parameters:
txSerial transmit
rxSerial recieve
baudSerial baudreate speed (default 9600)

Definition at line 5 of file SerialTerminal.cpp.


Member Function Documentation

void background ( int  colour )

Set the background colour.

Definition at line 33 of file SerialTerminal.cpp.

void cls (  )

Clear the screen and locate to 0,0.

Definition at line 10 of file SerialTerminal.cpp.

void foreground ( int  colour )

Set the foreground colour.

Definition at line 26 of file SerialTerminal.cpp.

void hide_cursor (  )

Hides cursor.

Definition at line 66 of file SerialTerminal.cpp.

void hideCursor (  )

Hide Cursor from terminal.

Definition at line 40 of file SerialTerminal.cpp.

void locate ( int  column,
int  row 
)

Locate to a screen column and row.

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0

Definition at line 14 of file SerialTerminal.cpp.

int printf ( const char *  format,
  ... 
)

Write a formated string to the terminal.

Parameters:
formatA printf-style format string, followed by the variables to use in formating the string.
int putc ( int  c )

Write a character to the terminal.

Parameters:
cThe character to write to the display
void show_cursor (  )

Enables cursor.

Definition at line 70 of file SerialTerminal.cpp.

void showCursor (  )

Hide Cursor from terminal.

Definition at line 45 of file SerialTerminal.cpp.