// standard ASCII symbols #define CR 0x0D #define LF 0x0A #define BS 0x08 #define ESC 0x1B #define SP 0x20 #define DEL 0x7F //-------------------------SCI0_Init------------------------ // Initialize Serial port SCI0 // Output: none extern void SCI0_Init(void); //-------------------------SCI0_InStatus-------------------------- // Checks if new input is ready, TRUE if new input is ready // Input: none // Output: TRUE if a call to InChar will return right away with data // FALSE if a call to InChar will wait for input extern char SCI0_InStatus(void); //-------------------------SCI0_InChar------------------------ // Wait for new serial port input, busy-waiting synchronization // Input: none // Output: ASCII code for key typed extern char SCI0_InChar(void); extern int SCI0_InString(char *, unsigned short); // Reads in a String of max length //----------------------SCI0_InUDec------------------------------- // InUDec accepts ASCII input in unsigned decimal format // and converts to a 16 bit unsigned number // valid range is 0 to 65535 // Input: none // Output: 16-bit unsigned number // If you enter a number above 65535, it will truncate without an error // Backspace will remove last digit typed extern unsigned short SCI0_InUDec(void); //---------------------SCI0_InUHex---------------------------------------- // Accepts ASCII input in unsigned hexadecimal (base 16) format // Input: none // Output: 16-bit unsigned number // No '$' or '0x' need be entered, just the 1 to 4 hex digits // It will convert lower case a-f to uppercase A-F // and converts to a 16 bit unsigned number // value range is 0 to FFFF // If you enter a number above FFFF, it will truncate without an error // Backspace will remove last digit typed extern unsigned short SCI0_InUHex(void); //-----------------------SCI0_OutStatus---------------------------- // Checks if output data buffer is empty, TRUE if empty // Input: none // Output: TRUE if a call to OutChar will output and return right away // FALSE if a call to OutChar will wait for output to be ready extern char SCI0_OutStatus(void); //-------------------------SCI0_OutChar------------------------ // Wait for buffer to be empty, output 8-bit to serial port // busy-waiting synchronization // Input: 8-bit data to be transferred // Output: none extern void SCI0_OutChar(char); //-----------------------SCI0_OutUDec----------------------- // Output a 16-bit number in unsigned decimal format // Input: 16-bit number to be transferred // Output: none // Variable format 1-5 digits with no space before or after extern void SCI0_OutUDec(unsigned short); //-------------------------SCI0_OutString------------------------ // Output String (NULL termination), busy-waiting synchronization // Input: pointer to a NULL-terminated string to be transferred // Output: none extern void SCI0_OutString(char *pt); //--------------------------SCI0_OutUHex---------------------------- // Output a 16 bit number in unsigned hexadecimal format // Input: 16-bit number to be transferred // Output: none // Variable format 1 to 4 digits with no space before or after extern void SCI0_OutUHex(unsigned short);