Aguijón Software Libraries  1.0
Documentation for the included Libraries
 All Files Functions Variables Typedefs Enumerations Enumerator Macros
serial.c File Reference
#include <p24FJ128GB106.h>
#include "string.h"
#include "serial.h"
#include <uart.h>
#include "definitions.h"

Go to the source code of this file.

Functions

void rx_int (void)
 
void tx_int (void)
 
void __attribute__ ((interrupt, no_auto_psv))
 
void initUARTcommunication (void)
 
void RS232_put (unsigned int data)
 

Variables

unsigned char RX_data = 0
 Received RS232 temporal variable.
 
unsigned char BufferIndex = 0
 Index used to access different buffer values.
 
unsigned char cmdBuffer [20]
 Buffer in which we store RX_data.
 
unsigned char MessageLength = 0
 Buffer´s Lenght in bytes.
 

Function Documentation

void __attribute__ ( (interrupt, no_auto_psv)  )

Function: rx_int

Preconditions: Receive RS232 data.

Overview: Interrupt which interprets the received data.

Arguments: None.

Returns: None.

Definition at line 101 of file serial.c.

void initUARTcommunication ( void  )

Function: initUARTcommunication

Preconditions: Remmaped Rx & Tx pins.

Overview: Initializes the internal UART2 module.

Arguments: None.

Returns: None.

Definition at line 135 of file serial.c.

void RS232_put ( unsigned int  data)

Function: RS232_put

Preconditions: none.

Overview: Sends data using the included Microchip UART library.

Arguments: Data that will be sent.

Returns: None.

Definition at line 163 of file serial.c.

void rx_int ( void  )

Function: rx_int

Preconditions: Receive RS232 data.

Overview: Interrupt which interprets the received data.

Arguments: None.

Returns: None.

Definition at line 53 of file serial.c.

void tx_int ( void  )

Function: tx_int

Preconditions: Sends RS232 data (unimplemented).

Overview: Interrupt which sends data over RS232 (unimplemented).

Arguments: None.

Returns: None.

Definition at line 85 of file serial.c.

Variable Documentation

unsigned char BufferIndex = 0

Index used to access different buffer values.

Definition at line 32 of file serial.c.

unsigned char cmdBuffer[20]

Buffer in which we store RX_data.

Array in which recieved RS232 data will be stored.

Definition at line 34 of file serial.c.

unsigned char MessageLength = 0

Buffer´s Lenght in bytes.

Definition at line 36 of file serial.c.

unsigned char RX_data = 0

Received RS232 temporal variable.

Definition at line 30 of file serial.c.