c2b040193a777c09bdc595c95492b57a2521db87
Stefan Schuermans added file headers

Stefan Schuermans authored 12 years ago

1) /* MIPS I system
2)  * Copyright 2011-2012 Stefan Schuermans <stefan@schuermans.info>
3)  * Copyleft GNU public license V2 or later
4)  *          http://www.gnu.org/copyleft/gpl.html
5)  */
6) 
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

7) #ifndef UART_H
8) #define UART_H
9) 
10) /**
11)  * @brief configure baudrate scaler
12)  * @param[in] scale baudrate scaler (1 = 7.143 Mhz)
13)  */
14) void uart_cfg_scale(unsigned short scale);
15) 
16) /**
17)  * @brief configure number of data bits
18)  * @param[in] bits number of data bits
19)  */
20) void uart_cfg_bits(unsigned char bits);
21) 
22) /**
23)  * @brief configure number of stop bits
24)  * @param[in] stop number of stop bits
25)  */
26) void uart_cfg_stop(unsigned char stop);
27) 
Stefan Schuermans UART firmware for testing i...

Stefan Schuermans authored 12 years ago

28) /**
29)  * @brief check if transmitting a character is possible
30)  * @return if transmitting a character is possible
31)  */
32) int uart_can_tx(void);
33) 
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

34) /**
35)  * @brief transmit a character
36)  * @param[in] chr character to transmit
37)  */
38) void uart_tx(unsigned short chr);
39) 
Stefan Schuermans UART firmware for testing i...

Stefan Schuermans authored 12 years ago

40) /**
41)  * @brief check if receiving a character is possible
42)  * @return if receiving a character is possible
43)  */
44) int uart_can_rx(void);
45) 
Stefan Schuermans added FIFO to UART RX

Stefan Schuermans authored 12 years ago

46) /**
47)  * @brief receive a character
48)  * @return character received
49)  */
50) unsigned short uart_rx(void);
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

51) 
Stefan Schuermans add UART error check to FW

Stefan Schuermans authored 12 years ago

52) /**
53)  * @brief determine if character is an error character
54)  * @param[in] chr character to check
55)  * @return if error
56)  */
57) int uart_is_err(unsigned short chr);
58)