Rev 5 | Rev 8 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 5 | Rev 7 | ||
|---|---|---|---|
| Line 32... | Line 32... | ||
| 32 | extern usart_ctl uc2; |
32 | extern usart_ctl uc2; |
| 33 | #endif |
33 | #endif |
| 34 | #if defined SERIAL_UART3 |
34 | #if defined SERIAL_UART3 |
| 35 | extern usart_ctl uc3; |
35 | extern usart_ctl uc3; |
| 36 | #endif |
36 | #endif |
| - | 37 | #if defined SERIAL_UART4 |
|
| - | 38 | extern usart_ctl uc4; |
|
| - | 39 | #endif |
|
| - | 40 | #if defined SERIAL_UART5 |
|
| - | 41 | extern usart_ctl uc5; |
|
| - | 42 | #endif |
|
| 37 | 43 | ||
| 38 | 44 | ||
| 39 | 45 | ||
| 40 | 46 | ||
| 41 | 47 | ||
| 42 | - | ||
| 43 | /* returns the number of characters received by the Rx USART */ |
48 | ///@brief returns the number of characters in the recieve buffer |
| 44 | extern uint16_t SerialCharsReceived(usart_ctl * instance); |
49 | extern uint16_t SerialCharsReceived(usart_ctl * instance); |
| - | 50 | ///@brief Get the amount of free space in the transmit buffer. |
|
| - | 51 | extern uint16_t SerialTransmitSpace(usart_ctl * instance); |
|
| - | 52 | ||
| 45 | 53 | ||
| 46 | extern uint8_t PollSerial(usart_ctl * instance); |
54 | extern uint8_t PollSerial(usart_ctl * instance); |
| 47 | extern uint8_t GetCharSerial(usart_ctl * instance); |
55 | extern uint8_t GetCharSerial(usart_ctl * instance); |
| 48 | extern void EnableSerialRxInterrupt(usart_ctl * instance); |
56 | extern void EnableSerialRxInterrupt(usart_ctl * instance); |
| 49 | 57 | ||
| Line 56... | Line 64... | ||
| 56 | extern uint8_t TxBufferEmpty(usart_ctl * instance); |
64 | extern uint8_t TxBufferEmpty(usart_ctl * instance); |
| 57 | ///@brief wait until the USART buffer is empty and all characters are sent |
65 | ///@brief wait until the USART buffer is empty and all characters are sent |
| 58 | extern void TxWaitEmpty(usart_ctl *instance); |
66 | extern void TxWaitEmpty(usart_ctl *instance); |
| 59 | 67 | ||
| 60 | 68 | ||
| - | 69 | ||
| 61 | extern void init_usart_ctl(usart_ctl * instance, |
70 | extern void init_usart_ctl(usart_ctl * instance, |
| 62 | UART_HandleTypeDef * usart); |
71 | UART_HandleTypeDef * usart); |
| 63 | 72 | ||
| 64 | extern void setBaud(usart_ctl * instance, uint32_t baud); |
73 | extern void setBaud(usart_ctl * instance, uint32_t baud); |
| 65 | 74 | ||
| - | 75 | extern void sendString(usart_ctl *ctl, char *string, int length); |
|
| 66 | #endif /* INC_SERIAL_H_ */ |
76 | #endif /* INC_SERIAL_H_ */ |