#include "uart_drv.h"
#include "lib_mcu/uart/uart_bdr.h"
Include dependency graph for uart_lib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | AUTOBAUD 0 |
| #define | BAUDRATE 999 |
| #define | UART_CONFIG MSK_UART_8BIT |
Functions | |
| char | uart_getchar (void) |
| This function allows to get a character from the UART. | |
| bit | uart_init (void) |
| This function configures the UART configuration and timming following the constant definition of BAUDRATE and enables the UART controller. | |
| r_uart_ptchar | uart_putchar (p_uart_ptchar uc_wr_byte) |
| This function allows to send a character on the UART. | |
| bit | uart_test_hit (void) |
| This function allows to inform if a character was received. | |
| #define AUTOBAUD 0 |
Definition at line 33 of file uart_lib.h.
| #define BAUDRATE 999 |
Definition at line 30 of file uart_lib.h.
| #define UART_CONFIG MSK_UART_8BIT |
| char uart_getchar | ( | void | ) |
This function allows to get a character from the UART.
Definition at line 62 of file uart_lib.c.
References Uart_ack_rx_byte, Uart_get_byte, and Uart_rx_ready.
Referenced by build_cmd().
00063 { 00064 register char c; 00065 00066 while(!Uart_rx_ready()); 00067 c = Uart_get_byte(); 00068 Uart_ack_rx_byte(); 00069 return c; 00070 }
Here is the caller graph for this function:

| bit uart_init | ( | void | ) |
This function configures the UART configuration and timming following the constant definition of BAUDRATE and enables the UART controller.
Definition at line 34 of file uart_lib.c.
References BAUDRATE, TRUE, UART_CONFIG, Uart_double_bdr, Uart_enable, Uart_hw_init, and Uart_set_baudrate.
Referenced by ushell_task_init().
00035 { 00036 #ifndef UART_U2 00037 Uart_set_baudrate(BAUDRATE); 00038 Uart_hw_init(UART_CONFIG); 00039 #else 00040 Uart_set_baudrate(BAUDRATE/2); 00041 Uart_double_bdr(); 00042 Uart_hw_init(UART_CONFIG); 00043 00044 #endif 00045 Uart_enable(); 00046 return TRUE; 00047 }
Here is the caller graph for this function:

| r_uart_ptchar uart_putchar | ( | p_uart_ptchar | uc_wr_byte | ) |
This function allows to send a character on the UART.
| uc_wr_byte | character to print on UART. |
Definition at line 50 of file uart_lib.c.
References Uart_send_byte, Uart_set_tx_busy, and Uart_tx_ready.
00051 { 00052 while(!Uart_tx_ready()); 00053 Uart_set_tx_busy(); // Set Busy flag before sending (always) 00054 Uart_send_byte(ch); 00055 00056 return ch; 00057 }
| bit uart_test_hit | ( | void | ) |
This function allows to inform if a character was received.
Definition at line 28 of file uart_lib.c.
References Uart_rx_ready.
Referenced by build_cmd().
00029 { 00030 return Uart_rx_ready(); 00031 }
Here is the caller graph for this function:

1.4.7