//--------------------------------------------------------------------------- // File: C:\pic\GPSDO\UART_PIC.h // Author: Wolfgang Buescher, DL4YHF // Date: 2015-12-25 // Purpose: Simple UART functions for PIC microcontollers . //--------------------------------------------------------------------------- #ifndef _SWITCHES_H_ # include "switches.h" // <- should have been included BEFORE UART_PIC.h ! #endif #ifndef uint8_t # include #endif // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Global variables (remember, this is a PIC with an undersized RAM, // so we will sooner of later have to 'abuse' these variables // for other purposes. Thus, declare the following vars globally.) extern char UART_sz9Temp[10]; // temporary string, used to convert integer to string, etc // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Function prototypes void UART_Init(void); void UART_SendChar( char c ); void UART_SendCrNl(void); void UART_SendString( const char *cp ); void UART_SendDecimal( short i16 ); uint8_t UART_ReadChar(void); #if( RXD_INVERT_POLARITY ) // need to invert the polarity of received data by software ? uint8_t UART_InvertRcvdChar( uint8_t bRcvdChar ); #endif // EOF ( UART_PIC.h )