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

headerfile for BDI.c More...

#include "fx2regs.h"
#include "TP3465regs.h"

Go to the source code of this file.

Defines

#define BDIout   IOD
#define BDIddr   OED
#define BDIddrInit   0xc2
#define BDIoutInit   0x02
#define bmDSCK   0x10
#define bmDSDI   0x08

Functions

void initBDI ()
 initializes the endpoints used to program the msp555
void initTP3465 ()
 initializes the TP3465
void BDI_get_freeze ()
 freezes the BDI
void exceptionOnTimeoutOn ()
 turns exceptions On Timeout On
void exceptionOnTimeoutOff ()
 turns exceptions On Timeout Off
void handelBDIPackages ()
 this method receives and sends packages from/too the Host.

Variables

__sbit __at FREEZE
__sbit __at HARD_RESET
__sbit __at DSDO
__sbit __at DSDI
__sbit __at DSCK
__sbit __at BERR
__sbit __at STATUS_LED1
__sbit __at STATUS_LED2

Detailed Description

headerfile for BDI.c

Author:
Tinner Marco
Version:
1.1
Date:
06.01.2011

Definition in file BDI.h.


Define Documentation

#define BDIddr   OED

0 = input, 1 = output

Definition at line 34 of file BDI.h.

#define BDIddrInit   0xc2

11000010 (STATUS_LED2 STATUS_LED1 BERR DSCK DSDI DSDO HARD_RESET FREEZE)

Definition at line 36 of file BDI.h.

#define BDIout   IOD

use portD for BDI (bit-addressable)

Definition at line 32 of file BDI.h.

#define BDIoutInit   0x02

00000010 // 0x12 (00010010 for 332)

Definition at line 38 of file BDI.h.

#define bmDSCK   0x10

Bitmask DSCK

Definition at line 42 of file BDI.h.

#define bmDSDI   0x08

Bitmask DSDI

Definition at line 44 of file BDI.h.


Function Documentation

void initBDI ( )

initializes the endpoints used to program the msp555

disable timeouts, configure endpoint 2 and 6 and reset FIFO's of endpoint 2 and 6

Definition at line 58 of file BDI.c.

void initTP3465 ( )

initializes the TP3465

The TP3465 is a chip that allows the CPU to communicate over a MICROWIRE interface with a peripheral device.

Definition at line 45 of file BDI.c.


Variable Documentation

__sbit __at BERR

PD5

Definition at line 58 of file BDI.h.

__sbit __at DSCK

PD4, this pin is used as BPKT (negated) for 332 when not in debug mode

Definition at line 56 of file BDI.h.

__sbit __at DSDI

PD3

Definition at line 54 of file BDI.h.

__sbit __at DSDO

PD2

Definition at line 52 of file BDI.h.

__sbit __at FREEZE

PD0

Definition at line 48 of file BDI.h.

__sbit __at HARD_RESET

PD1

Definition at line 50 of file BDI.h.

__sbit __at STATUS_LED1

PD6, blinks if controller is running

Definition at line 60 of file BDI.h.

__sbit __at STATUS_LED2

PD7, on if connected to highspeed host controller

Definition at line 62 of file BDI.h.

 All Files Functions Variables Defines