Revision 211 trunk/cardbox/rs485_int.h
| rs485_int.h (revision 211) | ||
|---|---|---|
| 16 | 16 |
* Copyright 2009 Kevin Woo <kwoo@2ndt.com> |
| 17 | 17 |
* |
| 18 | 18 |
********/ |
| 19 |
/** @file uart.h |
|
| 19 |
/** @file rs485_int.h |
|
| 20 | 20 |
* |
| 21 | 21 |
* @brief Initializes UART functions using the UART hardware module |
| 22 | 22 |
* |
| ... | ... | |
| 53 | 53 |
* which msut be the value that is defined in the datasheet |
| 54 | 54 |
* for any particular speed (ie: 51 -> 9600bps) |
| 55 | 55 |
**/ |
| 56 |
void init_uart(uint16_t baud); |
|
| 56 |
void rs485_init(uint16_t baud); |
|
| 57 | 57 |
/** @brief Gets latest byte and returns it in output_byte. If the byte |
| 58 | 58 |
* was already read, returns -1 otherwise it returns 0 |
| 59 | 59 |
**/ |
| 60 |
int8_t uart_get_byte(uint8_t *output_byte); |
|
| 60 |
int8_t rs485_get_byte(uint8_t *output_byte); |
|
| 61 | 61 |
/** @brief Sends a character array of size size. If we are currently |
| 62 | 62 |
* transmitting it will block until the the current transmit |
| 63 | 63 |
* is done. |
| 64 | 64 |
**/ |
| 65 |
void uart_send_byte(uint8_t data); |
|
| 66 |
void uart_toggle_transmit(uint8_t state); |
|
| 65 |
void rs485_send_byte(uint8_t data); |
|
| 66 |
void rs485_toggle_transmit(uint8_t state); |
|
| 67 | 67 |
#endif |
Also available in: Unified diff