Data Structures | Macros | Typedefs | Functions
uart.h File Reference
#include <stdint.h>
#include "register_remap.h"
#include <stdbool.h>
#include <msp432.h>
#include "eusci.h"

Go to the source code of this file.

Data Structures

struct  _UART_config
 Configuration structure for compare mode in the UART module. See UART_initModule for parameter documentation. More...
 

Macros

#define DEFAULT_SYNC   0x00
 
#define EUSCI_A_UART_AUTOMATICBAUDRATE_SYNC   0x55
 
#define EUSCI_A_UART_NO_PARITY   0x00
 
#define EUSCI_A_UART_ODD_PARITY   0x01
 
#define EUSCI_A_UART_EVEN_PARITY   0x02
 
#define EUSCI_A_UART_MSB_FIRST   UCMSB
 
#define EUSCI_A_UART_LSB_FIRST   0x00
 
#define EUSCI_A_UART_MODE   UCMODE_0
 
#define EUSCI_A_UART_IDLE_LINE_MULTI_PROCESSOR_MODE   UCMODE_1
 
#define EUSCI_A_UART_ADDRESS_BIT_MULTI_PROCESSOR_MODE   UCMODE_2
 
#define EUSCI_A_UART_AUTOMATIC_BAUDRATE_DETECTION_MODE   UCMODE_3
 
#define EUSCI_A_UART_CLOCKSOURCE_SMCLK   UCSSEL__SMCLK
 
#define EUSCI_A_UART_CLOCKSOURCE_ACLK   UCSSEL__ACLK
 
#define EUSCI_A_UART_ONE_STOP_BIT   0x00
 
#define EUSCI_A_UART_TWO_STOP_BITS   UCSPB
 
#define EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION   0x01
 
#define EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION   0x00
 
#define EUSCI_A_UART_RECEIVE_INTERRUPT   UCRXIE
 
#define EUSCI_A_UART_TRANSMIT_INTERRUPT   UCTXIE
 
#define EUSCI_A_UART_RECEIVE_ERRONEOUSCHAR_INTERRUPT   UCRXEIE
 
#define EUSCI_A_UART_BREAKCHAR_INTERRUPT   UCBRKIE
 
#define EUSCI_A_UART_STARTBIT_INTERRUPT   UCSTTIE
 
#define EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT   UCTXCPTIE
 
#define EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG   UCRXIFG
 
#define EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG   UCTXIFG
 
#define EUSCI_A_UART_STARTBIT_INTERRUPT_FLAG   UCSTTIFG
 
#define EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG   UCTXCPTIFG
 
#define EUSCI_A_UART_LISTEN_ENABLE   UCLISTEN
 
#define EUSCI_A_UART_FRAMING_ERROR   UCFE
 
#define EUSCI_A_UART_OVERRUN_ERROR   UCOE
 
#define EUSCI_A_UART_PARITY_ERROR   UCPE
 
#define EUSCI_A_UART_BREAK_DETECT   UCBRK
 
#define EUSCI_A_UART_RECEIVE_ERROR   UCRXERR
 
#define EUSCI_A_UART_ADDRESS_RECEIVED   UCADDR
 
#define EUSCI_A_UART_IDLELINE   UCIDLE
 
#define EUSCI_A_UART_BUSY   UCBUSY
 
#define EUSCI_A_UART_DEGLITCH_TIME_2ns   0x00
 
#define EUSCI_A_UART_DEGLITCH_TIME_50ns   UCGLIT0
 
#define EUSCI_A_UART_DEGLITCH_TIME_100ns   UCGLIT1
 
#define EUSCI_A_UART_DEGLITCH_TIME_200ns   (UCGLIT0 + UCGLIT1)
 
#define EUSCI_A_UART_transmitData   UART_transmitData
 
#define EUSCI_A_UART_receiveData   UART_receiveData
 
#define EUSCI_A_UART_enableInterrupt   UART_enableInterrupt
 
#define EUSCI_A_UART_disableInterrupt   UART_disableInterrupt
 
#define EUSCI_A_UART_getInterruptStatus   UART_getInterruptStatus
 
#define EUSCI_A_UART_clearInterruptFlag   UART_clearInterruptFlag
 
#define EUSCI_A_UART_enable   UART_enableModule
 
#define EUSCI_A_UART_disable   UART_disableModule
 
#define EUSCI_A_UART_queryStatusFlags   UART_queryStatusFlags
 
#define EUSCI_A_UART_setDormant   UART_setDormant
 
#define EUSCI_A_UART_resetDormant   UART_resetDormant
 
#define EUSCI_A_UART_transmitAddress   UART_transmitAddress
 
#define EUSCI_A_UART_transmitBreak   UART_transmitBreak
 
#define EUSCI_A_UART_getReceiveBufferAddressForDMA   UART_getReceiveBufferAddressForDMA
 
#define EUSCI_A_UART_getTransmitBufferAddressForDMA   UART_getTransmitBufferAddressForDMA
 
#define EUSCI_A_UART_selectDeglitchTime   UART_selectDeglitchTime
 

Typedefs

typedef struct _UART_config UART_Config
 Type definition for _UART_config structure. More...
 

Functions

bool UART_initModule (uint32_t moduleInstance, const UART_Config *config)
 
void UART_transmitData (uint32_t moduleInstance, uint_fast8_t transmitData)
 
uint8_t UART_receiveData (uint32_t moduleInstance)
 
void UART_enableModule (uint32_t moduleInstance)
 
void UART_disableModule (uint32_t moduleInstance)
 
uint_fast8_t UART_queryStatusFlags (uint32_t moduleInstance, uint_fast8_t mask)
 
void UART_setDormant (uint32_t moduleInstance)
 
void UART_resetDormant (uint32_t moduleInstance)
 
void UART_transmitAddress (uint32_t moduleInstance, uint_fast8_t transmitAddress)
 
void UART_transmitBreak (uint32_t moduleInstance)
 
uint32_t UART_getReceiveBufferAddressForDMA (uint32_t moduleInstance)
 
uint32_t UART_getTransmitBufferAddressForDMA (uint32_t moduleInstance)
 
void UART_selectDeglitchTime (uint32_t moduleInstance, uint32_t deglitchTime)
 
void UART_enableInterrupt (uint32_t moduleInstance, uint_fast8_t mask)
 
void UART_disableInterrupt (uint32_t moduleInstance, uint_fast8_t mask)
 
uint_fast8_t UART_getInterruptStatus (uint32_t moduleInstance, uint8_t mask)
 
uint_fast8_t UART_getEnabledInterruptStatus (uint32_t moduleInstance)
 
void UART_clearInterruptFlag (uint32_t moduleInstance, uint_fast8_t mask)
 
void UART_registerInterrupt (uint32_t moduleInstance, void(*intHandler)(void))
 
void UART_unregisterInterrupt (uint32_t moduleInstance)
 

Copyright 2014, Texas Instruments Incorporated