Subversion Repositories Code-Repo

Rev

Rev 212 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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