1 function for configuring uart :
5 equivalent to uartX_set(NULL)
8 int8_t uartX_get (struct uart_params * conf )
13 this func fills the value of the structure with current values.
16 int8_t uartX_set( struct uart_params conf );
21 apply the conf. If conf==NULL, apply the default conf (static)
24 int8_t uart_enable(struct uart_param)
25 int8_t uart_disable(struct uart_param)
27 int8_t uart_tx_enable(struct uart_param)
28 int8_t uart_tx_disable(struct uart_param)
30 int8_t uart_rx_enable(struct uart_param)
31 int8_t uart_rx_disable(struct uart_param)
33 int8_t uart_dont_loose_data(struct uart_param)
34 int8_t uart_can_loose_data(struct uart_param)
36 int8_t uart_use_double_speed(struct uart_param)
37 int8_t uart_use_simple_speed(struct uart_param)
39 int8_t uart_parity_none(struct uart_param)
40 int8_t uart_parity_odd(struct uart_param)
41 int8_t uart_parity_even(struct uart_param)
43 int8_t uart_stop_bits(struct uart_param, uint8_t nbits)
45 int8_t uart_baudrate(struct uart_param, uint32_t baudrate)
49 unsigned char enabled : 1,
62 Configuration example :
64 ** change one parameter only :
66 uart1_set_baudrate(uint32_t baudrate)
70 if (uart1_get(&u) < 0) {
75 if (uart1_baudrate(u, baudrate) < 0) {
80 if (uart1_set(u) < 0) {