n

Dependencies:   mbed

Fork of LG by igor Apu

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers uart_m.h Source File

uart_m.h

00001 #ifndef __UART_H
00002 #define __UART_H
00003 
00004 #define PortEUART0      LPC_GPIO4->FIOPIN
00005 #define PortDirEUART0 LPC_GPIO4->FIODIR
00006 #define PinEUART0       1UL << 29
00007 
00008 #define PortEUART1      LPC_GPIO2->FIOPIN
00009 #define PortDirEUART1 LPC_GPIO2->FIODIR
00010 #define PinEUART1       1UL << 2
00011 
00012 
00013 #define PortEUART2      LPC_GPIO2->FIOPIN
00014 #define PortDirEUART2 LPC_GPIO2->FIODIR
00015 #define PinEUART2       1UL << 13
00016 
00017 #define PortEUART3      LPC_GPIO0->FIOPIN
00018 #define PortDirEUART3 LPC_GPIO0->FIODIR
00019 #define PinEUART3       1UL << 24
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 void UART0_Init (void);
00030 void UART1_Init_temp (void);
00031 void UART2_Init (void);
00032 void UART3_Init (void);
00033 
00034 void UART2_InitSet  (unsigned int speed, unsigned int SetLsr);
00035 void UART3_InitSet  (unsigned int speed, unsigned int SetLsr);
00036 void UART_InitSet   (unsigned int Num,unsigned int Speed, unsigned int SetLsr);
00037 
00038 
00039 
00040 int  UART0_SendByte     (int ucData);
00041 
00042 int  UART0_GetChar (void);
00043 int  UART1_GetChar (void);
00044 int  UART2_GetChar (void);
00045 int  UART3_GetChar (void);
00046 
00047 
00048 int  UART0_Chek (void);
00049 int  UART1_Chek (void);
00050 int  UART2_Chek (void);
00051 int  UART3_Chek (void);
00052 
00053 void    UART0_SendString (char *s); 
00054 void    UART2_SendString (char *s);
00055 
00056 
00057 int     UART2_SendByte (int ucData);
00058 int     UART2_SendByte_i (int ucData);
00059 int     UART2_GetChar (void);
00060 int     UART2_Chek (void);
00061 
00062 void    Concol ( void); 
00063 void    Concol1 ( void); 
00064 void    Concol2 ( void); 
00065 void    Concol3 ( void); 
00066 
00067 void    WriteCon            (char *s);
00068 void    WriteCon1       (char *s);
00069 void    WriteCon2       (char *s);
00070 void    WriteConF (char *s, unsigned int Num);
00071 
00072 void WriteConN (char *s, unsigned int N);
00073     
00074 void    WriteConByte    (unsigned int In) ;
00075 void    WriteCon2Byte (unsigned int In) ;
00076 void    WriteCon3Byte (unsigned int In) ;
00077 
00078     
00079 void    WriteConByteF (unsigned int In,unsigned int Num ); 
00080 
00081 
00082 int     ReadCon (char *s); 
00083 int     ReadCon1 (char *s); 
00084 int     ReadCon2 (char *s); 
00085 int     ReadCon3 (char *s); 
00086 
00087 int     ReadChekCon (char *s); 
00088 int     ReadChekCon2 (char *s); 
00089 int     ReadChekCon3 (char *s); 
00090 
00091 int     ChekInCon ( void); 
00092 int     ChekInCon1 ( void); 
00093 int     ChekInCon2 ( void); 
00094 int     ChekInCon3 ( void); 
00095 
00096 int     ChekOutCon ( void); 
00097 int     ChekOutCon1 ( void); 
00098 int     ChekOutCon2 ( void); 
00099 int     ChekOutCon3 ( void); 
00100 
00101 
00102 
00103 void SetDeUART0 (void);
00104 void ClrDeUART0 (void);
00105 void SetDeUART1 (void);
00106 void ClrDeUART1 (void);
00107 void SetDeUART2 (void);
00108 void ClrDeUART2 (void);
00109 void SetDeUART3 (void);
00110 void ClrDeUART3 (void);
00111 
00112 
00113 
00114 
00115 extern unsigned int     OutBufConCount ;
00116 extern unsigned int     OutBufCon1Count;
00117 extern unsigned int     OutBufCon2Count;
00118 extern unsigned int     OutBufCon3Count;
00119 
00120 
00121 
00122 #endif
00123