Subversion Repositories Code-Repo

Rev

Rev 231 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
212 Kevin 1
#ifndef UART1_H
2
#define UART1_H
3
 
4
#define UART1_BUFFER_SIZE 128
5
 
6
typedef struct {
231 Kevin 7
    void (*rx_callback)(uint8_t c);
212 Kevin 8
 
231 Kevin 9
    uint8_t buffer_out[UART1_BUFFER_SIZE];
10
    uint32_t buffer_out_ind;
11
    uint32_t buffer_out_len;
212 Kevin 12
} UART1_DATA;
13
 
231 Kevin 14
void UART1_Init(UART1_DATA *data, void (*rx_callback)(uint8_t));
15
uint8_t UART1_Write(uint8_t *string, uint32_t length);
212 Kevin 16
 
17
#endif  /* UART1_H */