Designer Reference Manual
USB08 Evaluation Board
104
Source Code Files
MOTOROLA
Source Code Files
U08USB.C
//============================================================================
// File: U08USB.C
// Func: USB Implementation Module for USB08 Demo Application
// Ver.: 1.00
// Auth: (C)2000,2001 by Oliver Thamm, MCT Elektronikladen GbR
// http://hc08web.de/usb08
// Rem.: View/Edit this File with TAB-Size=4
//============================================================================
//----------------------------------------------------------------------------
#include "u08usb.h"
// Definitions for USB Data Types & Constants
#include "u08desc.c"
// const USB Descriptor Data
//----------------------------------------------------------------------------
// Source Code Option - set as required by Hardware!
//
#define USB_IPUE1
// Internal Pull-up Enable
// 1=Enable(use build-in Pull-up Resistor)
// 0=Disable (external Pull-up required)
//-- Variables ---------------------------------------------------------------
volatile uchar USB_State;
#define MAX_TXBUF_SIZE 16
// must be 2^x!
volatile uchar TxBuffer[MAX_TXBUF_SIZE];
volatile uchar TxBuf_RdIdx;
volatile uchar TxBuf_WrIdx;
#define MAX_RXBUF_SIZE 16
// must be 2^x!
volatile uchar RxBuffer[MAX_RXBUF_SIZE];
volatile uchar RxBuf_RdIdx;
volatile uchar RxBuf_WrIdx;
volatile uchar SuspendCounter;
setup_buffer SetupBuffer;
uchar SetupSize;
uchar * SetupDataPtr;
uchar R0Sequence;
// DATA0/1 Flag for EP0 Rx
uchar R2Sequence;
// DATA0/1 Flag for EP2 Rx
//----------------------------------------------------------------------------
// Force STALL Condition for EP0 (both IN and OUT)
// as a Response to an invalid SETUP Request
// Flags will be auto-cleared by the next SETUP Token
//
void forceSTALL() {
UCR3 |= BM_O BM_ISTALL0;
}
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...