USB-BDI
Defines | Functions | Variables
M:/USB-BDI/USB-BDI/Firmware/MPC555-USB-BDI/include/usbpdi_main.h File Reference

headerfile usbpdi_main.c More...

#include "fx2regs.h"
#include "syncdelay.h"
#include "dispatch.h"

Go to the source code of this file.

Defines

#define PACKET_HEADER   0x5B
#define PACKET_END   0x1F
#define PACKET_DATA_OFFSET   5
#define PACKET_MIN_LENGTH   6
#define usbOutBuffer   EP2FIFOBUF
#define usbInBuffer   EP6FIFOBUF
#define STATUS_LED_COUNT_LIMIT   0x80

Functions

void sendPacket (unsigned short length)
 starts the sending of the package

Variables

unsigned short outBufIndex
unsigned short inBufIndex

Detailed Description

headerfile usbpdi_main.c

Author:
Schlaepfer Stephan
Version:
1.0
Date:
15.11.2006

Definition in file usbpdi_main.h.


Define Documentation

#define PACKET_DATA_OFFSET   5

offset to the first byte of data

Definition at line 40 of file usbpdi_main.h.

#define PACKET_END   0x1F

last byte of packet

Definition at line 38 of file usbpdi_main.h.

#define PACKET_HEADER   0x5B

header byte

Definition at line 36 of file usbpdi_main.h.

#define PACKET_MIN_LENGTH   6

minimal Length of a packet (no payload)

Definition at line 42 of file usbpdi_main.h.

#define STATUS_LED_COUNT_LIMIT   0x80

set the speed for the status led

Definition at line 51 of file usbpdi_main.h.

#define usbInBuffer   EP6FIFOBUF

usb in Buffer

Definition at line 48 of file usbpdi_main.h.

#define usbOutBuffer   EP2FIFOBUF

usb out Buffer

Definition at line 46 of file usbpdi_main.h.


Function Documentation

void sendPacket ( unsigned short  dataLength)

starts the sending of the package

writes the length of the package which should be send in the bytecount register. This step then triggers the sending of the package.

Parameters:
dataLengthnummber of bytes which want to be sent

Definition at line 112 of file BDI.c.


Variable Documentation

unsigned short inBufIndex

current location of INBUFFER

Definition at line 36 of file BDI.c.

unsigned short outBufIndex

uncomment to include debugging procedures

current location of OUTBUFFER

Definition at line 34 of file BDI.c.

 All Files Functions Variables Defines