USB-BDI
Functions | Variables
M:/USB-BDI/USB-BDI/Firmware/MPC555-USB-BDI/src/virtual_com_port.c File Reference

This file handles everything which has to do with the virtual com port. More...

#include "virtual_com_port.h"
#include "BDI.h"
#include "usbpdi_common.h"
#include "uart.h"

Go to the source code of this file.

Functions

void initVirtualComPort (void)
 This method initials the virtual com port.
void handelPackegesOnComEp (void)
 This method handles sending notifications to the host if available (Endpoint 1IN)
void handelPackegesOnBulkInEp (void)
 This method takes the Data out of the UART Buffer and send them to the Host(Endpoint 4)
void handelPackegesOnBulkOutEp (void)
 This method handles received data from the host and puts them on the UART Buffer to the MSP555 (Endpoint 8).
void handelVirtualComPortPackages (void)
 This method runs the package handling for the virtual com port.

Variables

unsigned long bitRate
unsigned char stopBit
unsigned char parityBit
unsigned char dataBits
unsigned short stopTime
unsigned char rts
unsigned char dtr
unsigned short nrOfBytesInEp8Fifo

Detailed Description

This file handles everything which has to do with the virtual com port.

Author:
Tinner Marco
Version:
1.0
Date:
16.12.2011

Definition in file virtual_com_port.c.


Function Documentation

void handelPackegesOnBulkInEp ( void  )

This method takes the Data out of the UART Buffer and send them to the Host(Endpoint 4)

Todo:
Find a better way of calculating absolute values

Definition at line 107 of file virtual_com_port.c.

void handelPackegesOnBulkOutEp ( void  )

This method handles received data from the host and puts them on the UART Buffer to the MSP555 (Endpoint 8).

If the available data is to big they will be skipt. If the data coming in to fast maybe old data will be overwritten

Definition at line 148 of file virtual_com_port.c.

This method runs the package handling for the virtual com port.

It has to be called periodical in the main routine.

Definition at line 175 of file virtual_com_port.c.

void initVirtualComPort ( void  )

This method initials the virtual com port.

It sets the RS-232 initial values , configs endpoint 1,4 and 6 and their fifos, disable the endpoints interrupts and resets the fifos.

Definition at line 52 of file virtual_com_port.c.


Variable Documentation

unsigned long bitRate

bit rate

Definition at line 29 of file virtual_com_port.c.

unsigned char dataBits

Number of data bits (5, 6, 7, 8, or 16)

Definition at line 35 of file virtual_com_port.c.

unsigned char dtr

DTR: 0= de-assert 1= assert

Definition at line 41 of file virtual_com_port.c.

unsigned short nrOfBytesInEp8Fifo

Number of bytes in Endpoint 8 FIFO

Definition at line 43 of file virtual_com_port.c.

unsigned char parityBit

Parity: 0 = None, 1 = Odd, 2 = Even, 3 = Mark, 4 = Space

Definition at line 33 of file virtual_com_port.c.

unsigned char rts

RTS: 0= de-assert 1= assert

Definition at line 39 of file virtual_com_port.c.

unsigned char stopBit

Stop bits: 0 = 1 Stop bit, 1 = 1.5 Stop bits, 2 = 2 Stop bits

Definition at line 31 of file virtual_com_port.c.

unsigned short stopTime

Stop time in msec

Definition at line 37 of file virtual_com_port.c.

 All Files Functions Variables Defines