ButterflyMP3

uart.h

Go to the documentation of this file.
00001 
00037 #ifndef __UART_H__
00038 #define __UART_H__
00039 
00040 /* Global definitions */
00041 typedef unsigned char  u08;
00042 typedef          char  s08;
00043 typedef unsigned short u16;
00044 typedef          short s16;
00045 typedef unsigned long  u32;
00046 typedef          long  s32;
00047 
00048 /* UART Baud rate calculation */
00049 // F_CPU now defined in the makefile
00050 #define UART_BAUD_RATE         38400   /* baud rate*/
00051 #define UART_BAUD_SELECT       (F_CPU/(UART_BAUD_RATE*8L)-1)
00052 
00053 /* Global functions */
00054 extern void UART_SendByte       (u08 Data);
00055 extern u08  UART_ReceiveByte    (void);
00056 extern void UART_PrintfProgStr  (const s08* pBuf);
00057 extern void UART_PrintfEndOfLine(void);
00058 extern void UART_Printfu08      (u08 Data);
00059 extern void UART_Printfu16      (u16 Data);
00060 extern void UART_Printfu32      (u32 Data);
00061 extern void UART_Init           (void);
00062 extern void UART_Shutdown               (void);
00063 extern unsigned char UART_HasChar(void);
00064 extern void UART_Puts                   (u08* pBuf);
00065 extern void UART_Putsln                 (u08* pBuf);
00066 
00067 extern void print_number(int base, int unsigned_p, long n);
00068 
00069 
00070 /* Macros */
00071 #define PRINT(string) (UART_PrintfProgStr(PSTR(string)))
00072 #define EOL           UART_PrintfEndOfLine
00073 
00074 #endif
00075 
 All Files Functions Variables Typedefs Enumerations Enumerator Defines