Mobil_surveillance_system 1
Defines | Typedefs | Functions | Variables
UART2.h File Reference

UART2 functions header file. More...

#include <string.h>
#include <stdlib.h>
#include "msp430f2617.h"
#include "Bitmanip.h"
#include "FIFO.h"
#include "Interrupts.h"

Go to the source code of this file.

Defines

#define UART2_RX_BUFFER_SIZE   16
 Size definitions of the used uart receive buffer.
#define UART2_TX_BUFFER_SIZE   16
 Size definitions of the used uart transfer buffer.
#define DEFINE_TBOOLEAN
#define UART2_TX_BUFFER_USED
#define UART2_TX_BUFFER_FREE   (UART2_TX_BUFFER_SIZE - UART2_TX_BUFFER_USED)
#define UART2_TX_BUFFER_EMPTY
#define UART2_TX_BUFFER_FULL
#define UART2_ADVANCE_TX_BUFFER_INDEX(Index)   ((Index) = ((Index) + 1) % UART2_TX_BUFFER_SIZE)
#define UART2_RX_BUFFER_USED
#define UART2_RX_BUFFER_FREE   (UART2_RX_BUFFER_SIZE - UART2_RX_BUFFER_USED)
#define UART2_RX_BUFFER_EMPTY
#define UART2_RX_BUFFER_FULL
#define UART2_ADVANCE_RX_BUFFER_INDEX(Index)   ((Index) = ((Index) + 1) % UART2_RX_BUFFER_SIZE)

Typedefs

typedef unsigned char tBoolean
typedef void(* tpfUART2AppendResponseCallbackFunction )(const char *)
 Callback functions functionpointer declarations.

Functions

void UART2_rxHandler (void)
void UART2_txHandler (void)
void UART2_initUART2 (void)
int UART2_read (void)
int UART2_write (char *pcBuffer, unsigned int uiLength)
void UART2_sendChar (void)
tBoolean UART2_isWritingDone (void)
void UART2_primeTransmit (void)
void UART2_flushRx (void)
void UART2_flushTx (void)
void UART2_setAppendResponseCallbackFunction (tpfUART2AppendResponseCallbackFunction pfCallbackAppendResponse)

Variables

tBoolean ge_tbUART2RXITFLAG
 This flag inicates if any character has been received .
tBoolean ge_tbUART2TXITFLAG
 This flag inicates if any character has been sent.

Detailed Description

UART2 functions header file.

This file contains the functions prototypes related to the UART2 periferia.

Definition in file UART2.h.


Define Documentation

#define UART2_ADVANCE_RX_BUFFER_INDEX (   Index)    ((Index) = ((Index) + 1) % UART2_RX_BUFFER_SIZE)

This macro can de used to increase the either the read or write index of the rx fifo.

Definition at line 118 of file UART2.h.

#define UART2_ADVANCE_TX_BUFFER_INDEX (   Index)    ((Index) = ((Index) + 1) % UART2_TX_BUFFER_SIZE)

This macro can de used to increase the either the read or write index of the tx fifo.

Definition at line 86 of file UART2.h.

#define UART2_RX_BUFFER_EMPTY
Value:

This macro can be used to decide if the rx fifo is free.

Definition at line 107 of file UART2.h.

#define UART2_RX_BUFFER_FREE   (UART2_RX_BUFFER_SIZE - UART2_RX_BUFFER_USED)

This macro can be used to decide if we have place in the rx fifo.

Definition at line 103 of file UART2.h.

#define UART2_RX_BUFFER_FULL
Value:

This macro can de used to decide if the rx fifo is full.

Definition at line 112 of file UART2.h.

#define UART2_RX_BUFFER_USED
Value:

This macro can be used to determine the current elements in the rx fifo.

Definition at line 97 of file UART2.h.

#define UART2_TX_BUFFER_EMPTY
Value:

This macro can be used to decide if the tx fifo is free.

Definition at line 75 of file UART2.h.

#define UART2_TX_BUFFER_FREE   (UART2_TX_BUFFER_SIZE - UART2_TX_BUFFER_USED)

This macro can be used to decide if we have place in the tx fifo.

Definition at line 71 of file UART2.h.

#define UART2_TX_BUFFER_FULL
Value:

This macro can de used to decide if the tx fifo is full.

Definition at line 80 of file UART2.h.

#define UART2_TX_BUFFER_USED
Value:

This macro can be used to determine the current elements in the tx fifo.

Definition at line 65 of file UART2.h.


Typedef Documentation

typedef unsigned char tBoolean

bool type defination

Definition at line 37 of file UART2.h.


Function Documentation

void UART2_setAppendResponseCallbackFunction ( tpfUART2AppendResponseCallbackFunction  pfCallbackAppendResponse)
Parameters:
pfCallbackAppendResponse

Definition at line 246 of file UART2.c.

{
    g_pfOnCallbackGPRSAppendResponse = pfCallbackAppendResponse;
}
 All Data Structures Files Functions Variables Typedefs Enumerations Defines