this file contains all the required functions to send and receive data using the UART module.
More...
#include "TI_USCI_UART_Regs.h"
Go to the source code of this file.
Defines |
|
#define | USCI_A_MODULE 0 |
|
#define | UART_BAUDRATE 57600 |
|
#define | UART_BAUDRATE_REG (unsigned short)(MCLK_FREQ/UART_BAUDRATE) |
|
#define | UART_PxIN P3IN |
|
#define | UART_PxOUT P3OUT |
|
#define | UART_PxDIR P3DIR |
|
#define | UART_PxIFG P3IFG |
|
#define | UART_PxIES P3IES |
|
#define | UART_PxIE P3IE |
|
#define | UART_PxSEL P3SEL |
|
#define | UART_PxREN P3REN |
|
#define | UART_RX_PAD BIT4 |
|
#define | UART_TX_PAD BIT3 |
Functions |
| void | InitUART (void) |
| | Function Name: InitUART.
|
| void | StartUARTRx (void) |
| | Function Name: StartUARTRx.
|
| void | StopUARTRx (void) |
| | Function Name: StopUARTRx.
|
| void | WriteUART (unsigned char data) |
| | Function Name: WriteUART.
|
| void | putsUART (unsigned char *buffer, unsigned short StringSize) |
| | Function Name: putsUART .
|
Detailed Description
this file contains all the required functions to send and receive data using the UART module.
- Author:
- Daniel Torres - Texas Instruments, Inc
- Date:
- November 2010
- Version:
- 1.0 Initial version
- Note:
- Built with IAR for MSP430 Version: 5.10
Definition in file UART.h.
Function Documentation
Function Name: InitUART.
Description: This function initialized the USCI-UART.
- Parameters:
-
- Returns:
- none
Definition at line 83 of file UART.c.
| void putsUART |
( |
unsigned char * |
buffer, |
|
|
unsigned short |
StringSize | |
|
) |
| | |
Function Name: putsUART .
Description: This function puts the data string to be transmitted into the transmit buffer (till NULL character) .
- Parameters:
-
| unsigned | char * address of the string buffer to be transmitted |
- Returns:
- None
Definition at line 162 of file UART.c.
| void StartUARTRx |
( |
void |
|
) |
|
Function Name: StartUARTRx.
Description: This function enables the USCI-UART interrupts in order to be ready to receive USBID messages.
- Parameters:
-
- Returns:
- none
Definition at line 125 of file UART.c.
Function Name: StopUARTRx.
Description: This function disables the USCI-UART interrupts in order to not acknowledge byte sent by the TX.
- Parameters:
-
- Returns:
- none
Definition at line 111 of file UART.c.
| void WriteUART |
( |
unsigned char |
data |
) |
|
Function Name: WriteUART.
Description: This function writes data into the UART TX REG.
- Parameters:
-
| unsigned | char data the data to be written |
- Returns:
- None
Definition at line 138 of file UART.c.