Source Code Files
Contents
USB08 Evaluation Board Designer Reference Manual
MOTOROLA Source Code Files 97
U08MAIN.C
//===================== ======================== ======================= ========
// File: U08MAIN.C
// Func: Main Module for USB08 Demo Application
// Ver.: 1.00
// Auth: (C)2000,2001 b y Oliver Thamm, MCT Elek tronikladen GbR
// http://hc08web .de/usb08
// Make: Build the project using U08MAIN.C, U08KEY.C,
// and VECJB8.C, use CRTS JB8.S as C-Startup Modul e
// Rem.: View/Edit this File with TAB-Size=4
//===================== ======================== ======================= ========
//-- Select Interface! ------------------------ ----------------------- --------
#define USE_USB_PIPE // by defining or NOT defining this
// label before co mpiling, you can
// select the comm unication interface
// (if defined => USB, if not => RS232)
//-- Includes --------- ------------------------ ----------------------- --------
#include "hc08jb8.h" // HC908JB8 Register and Bitmap Def in itions
#include "u08key.h" // Keyboard Module Hea der File
#include "u08led.h" // LED Module Header F ile (just Macros)
#include "u08adc.h" // Soft ADC Module Header File
//-- Compiler-dependent Stuff ----------------- ----------------------- --------
#define cli() _asm("cli")
#define nop() _asm("nop")
//-- Data Type Definiti ons -------------------- ----------------------- --------
typedef unsigned char uchar;
//-- Code Starts here - ------------------------ ----------------------- --------
#ifdef USE_USB_PIPE
#include "u08usb.c" // use USB implementat ion
#define initPipe initUSB
#define getPipe getUSB
#define putPipe putUSB
#else
#include "u08232.c" // use RS232 implement ation
#define initPipe initSSCI
#define getPipe getSSCI
#define putPipe putSSCI
@interrupt void isrUSB( ) { }
#endif
//--------------------- ------------------------ ----------------------- --------