embeddedlibrary
reusable software modules for embedded systems
Terminal Helper Functions

Enumerations

enum  term_color {
  Reset_all_attributes = 0, Bright, Dim, Underscore,
  Blink, Reverse, Hidden, ForegroundBlack = 30,
  ForegroundRed, ForegroundGreen, ForegroundYellow, ForegroundBlue,
  ForegroundMagenta, ForegroundCyan, ForegroundWhite, BackgroundBlack = 40,
  BackgroundRed, BackgroundGreen, BackgroundYellow, BackgroundBlue,
  BackgroundMagenta, BackgroundCyan, BackgroundWhite
}
 

Functions

void Terminal_CharXY (uint8_t channel, char c, char x, char y)
 
void Terminal_HideCursor (uint8_t channel)
 
void Terminal_ShowCursor (uint8_t channel)
 
void Terminal_SetColor (uint8_t channel, enum term_color color)
 
void Terminal_ClearScreen (uint8_t channel)
 

Detailed Description

Enumeration Type Documentation

enum term_color

This enumeration allows the user to easily set up specific configurations for the characters which are printed to the terminal. The position in this enumeration corresponds to the ANSI Escape Sequences for color text and formatting. Please reference http://bluesock.org/~willg/dev/ansi.html for specifics on which element in the enumeration is responsible for controlling what attribute within the terminal.

Warning
RT 10/10

Function Documentation

void Terminal_CharXY ( uint8_t  channel,
char  c,
char  x,
char  y 
)

Reusable function to push a character to a terminal at a specific location.

This function will only work when the buffer is used to communicate to a terminal supporting the used features (e.g. PuTTY)

Location 0,0 is the top left corner of the terminal

Parameters
channelUART channel
cchar to send
xzero base x location
yzero base y location
void Terminal_HideCursor ( uint8_t  channel)

Function to turn the cursor off

This function will make the cursor within the terminal hidden by utilizing the DECTCEM (DEC text cursor enable mode) escape sequence "%c[?25l". The ASCII_ESC character is needed so the terminal knows that the above sequence is a control sequence.

Parameters
channelUART Channel
Warning
RT 10/10
void Terminal_SetColor ( uint8_t  channel,
enum term_color  color 
)
Parameters
channel
color
Todo:
Gerald V. Document this function (when done change this line to "@todo MM check <your names> documentation"
void Terminal_ShowCursor ( uint8_t  channel)
Parameters
channel
Todo:
Gerald V. Document this function (when done change this line to "@todo MM check <your names> documentation"