Subversion Repositories libSerial

Rev

Rev 4 | Rev 7 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 5
Line 9... Line 9...
9
#define INC_SERIAL_H_
9
#define INC_SERIAL_H_
10
 
10
 
11
#include "main.h"
11
#include "main.h"
12
 
12
 
13
typedef struct {
13
typedef struct {
14
        USART_TypeDef *Instance;
14
        UART_HandleTypeDef * Handle;
15
 
15
 
16
        volatile uint8_t tx_usart_buff[TX_USART_BUFF_SIZ];
16
        volatile uint8_t tx_usart_buff[TX_USART_BUFF_SIZ];
17
        volatile unsigned int tx_usart_in_Ptr;
17
        volatile unsigned int tx_usart_in_Ptr;
18
        volatile unsigned int tx_usart_out_Ptr;
18
        volatile unsigned int tx_usart_out_Ptr;
19
        volatile uint8_t tx_usart_running;
19
        volatile uint8_t tx_usart_running;
Line 57... Line 57...
57
///@brief  wait until the USART buffer is empty and all characters are sent
57
///@brief  wait until the USART buffer is empty and all characters are sent
58
extern void TxWaitEmpty(usart_ctl *instance);
58
extern void TxWaitEmpty(usart_ctl *instance);
59
 
59
 
60
 
60
 
61
extern void init_usart_ctl(usart_ctl * instance,
61
extern void init_usart_ctl(usart_ctl * instance,
62
                           USART_TypeDef * usart);
62
                           UART_HandleTypeDef  * usart);
63
 
-
 
64
 
63
 
-
 
64
extern void setBaud(usart_ctl * instance, uint32_t baud);
65
 
65
 
66
#endif /* INC_SERIAL_H_ */
66
#endif /* INC_SERIAL_H_ */