uart_baudrate.h
Go to the documentation of this file.
00001 #ifndef __MSP430WARE_UARTBAUDRATE_H__
00002 #define __MSP430WARE_UARTBAUDRATE_H__
00003 
00004 //*****************************************************************************
00005 //
00006 //The following are the defines to include the required modules for this
00007 //peripheral in msp430xgeneric.h file
00008 //
00009 //*****************************************************************************
00010 #define __MSP430_HAS_USCI_Ax__
00011 
00012 //*****************************************************************************
00013 //
00014 //The following value selects low frequency mode eand NOT the oversampling mode
00015 //
00016 //*****************************************************************************
00017 #define UARTBAUDRATE_LOW_FREQUENCY_BAUDRATE_GENERATION    0x00
00018 
00019 
00020 typedef struct ERROR_STRUCTURE {
00021     double max_error;
00022     double max_positive_error;
00023     double max_negative_error;
00024 }MAX_ERR;
00025 
00026 
00027 extern double UARTBAUDRATE_txTbit (unsigned int mode,
00028     unsigned int i,
00029     unsigned int s_mod,
00030     unsigned int f_mod
00031     );
00032 
00033 extern MAX_ERR UARTBAUDRATE_txError (unsigned int mode,
00034     unsigned int s_mod,
00035     unsigned int f_mod
00036     );
00037 
00038 extern MAX_ERR UARTBAUDRATE_rxError (unsigned int mode,
00039     unsigned int s_mod,
00040     unsigned int f_mod,
00041     double t_sync
00042     );
00043 
00044 extern unsigned short UARTBAUDRATE_calculateBaudDividers (
00045     double brclk_f,
00046     double baudrate_f,
00047     unsigned char *UCAxBR0_value,
00048     unsigned char *UCAxBR1_value,
00049     unsigned int *UCAxMCTL_value,
00050     unsigned short overSampling
00051     );
00052 #endif

Copyright 2012, Texas Instruments Incorporated