Subversion Repositories Code-Repo

Rev

Blame | Last modification | View Log | RSS feed

#ifndef __uart_h
#define __uart_h

#define MAXUARTBUF 64

// FIFO circular buffer

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

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

void UART1_Init(void);
//void uart_2_init(void);
void UART1_Recv_Interrupt_Handler(void);
//void uart_2_recv_interrupt_handler(void);
void UART1_Send_Interrupt_Handler(void);
void UART1_WriteS(const rom char *fmt, ...);
void UART1_WriteB(const char *msg, unsigned char length);
unsigned char UART1_Read(char *buffer);
#endif