Subversion Repositories Code-Repo

Rev

Rev 152 | Blame | Last modification | View Log | RSS feed

#ifndef UART_H
#define UART_H

#define MAXUARTBUF 125

#define UART1_BREAK_CHAR        0x0D    //(CR)

#define UART1_RECV_BUFFER
//#define UART1_RECV_XBEE

typedef struct {
    char buffer_in[MAXUARTBUF];
    char buffer_in_read_ind;
    char buffer_in_write_ind;
    char buffer_in_len;
    char buffer_in_len_tmp;

    char buffer_out[MAXUARTBUF];
    char buffer_out_ind;
    char buffer_out_len;
} UART_DATA;

void UART1_Init(UART_DATA *data);
void UART1_Recv_Interrupt_Handler(void);
void UART1_Send_Interrupt_Handler(void);
//void UART1_WriteS(const char *fmt, ...);
//void UART1_WriteF(float f, char m);
void UART1_WriteS(char *string, char length);
void UART1_WriteC(const char c);
char UART1_Buffer_Len(void);
char UART1_Read_Buffer(char *buffer);
#endif