This repository has been archived on 2020-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
arduino_universal_serial_ad.../Universal_Serial_Adapter/Project.h

65 lines
1.3 KiB
C
Raw Normal View History

2013-03-10 19:06:30 +00:00
/*
Serial Adapter Project: Dynamic serial TTY passthroughs
by: Mike Crosson
Nusku Networks
date: 2013/03/09
license: CC-BY SA 3.0 - Creative commons share-alike 3.0
use this code however you'd like, just keep this license and
attribute.
*/
2013-03-10 18:26:41 +00:00
#include "ColorLCDShield.h"
2013-03-10 18:26:41 +00:00
// Standard colors
#define BACKGROUND BLACK
#define TEXT GRAY
#define HILIGHT GOLD
// Serial modes supported
// Abused in for loops / lookup tables -- DO NOT CHANGE none or set values
enum serialmode {
phone,
db9_norm,
db9_null,
cisco,
2013-03-10 20:56:25 +00:00
modelinespeed,
2013-03-10 18:26:41 +00:00
none=-1
};
// Map a mode -> text value
extern char* modeToText[];
2013-03-10 18:26:41 +00:00
// Line speeds supported
// Abused in for loops / lookup talbes -- DO NOT CHANGE none or set values
enum linespeed {
twentyFourHundredBaud,
ninetySixHundredBaud,
nineteenTwoK,
thirtyeightFourK,
fiftysevenFiveK,
oneNineteenTwoK,
2013-03-11 01:56:36 +00:00
maxlinespeed,
zero=-1
};
// Description / speed scruct to use in lookup table
struct linespeedinfo {
2013-03-11 01:56:36 +00:00
char* description;
int linespeed;
};
// Known and supported line speeds
extern linespeedinfo linespeeds[];
// LCD
extern LCDShield lcd; // Line length max is 16
2013-03-10 18:26:41 +00:00
// Buttons
extern int buttonPins[];
// Mode info needed
extern serialmode currentMode;
extern serialmode selectedMode;
extern linespeed currentLineSpeed;