cc1010eb.h

00001 /***************************************************************************** 00002 * * 00003 * ********** * 00004 * ************ * 00005 * *** *** * 00006 * *** +++ *** * 00007 * *** + + *** * 00008 * *** + CHIPCON CC1010 * 00009 * *** + + *** EVALUATION BOARD * 00010 * *** +++ *** HARDWARE DEFINITION FILE * 00011 * *** *** * 00012 * *********** * 00013 * ********* * 00014 * * 00015 ***************************************************************************** 00016 * The CC1010EB Evaluation Board has a number of buttons and LEDS which can * 00017 * be accessed more easily using the macros in this files. * 00018 ***************************************************************************** 00019 * Author: ROH * 00020 ***************************************************************************** 00021 * Revision history: * 00022 * 1.0 2002/04/01 First Public Release * 00023 * * 00024 * $Log: cc1010eb.h,v $ 00025 * Revision 1.2 2003/01/27 08:02:30 tos 00026 * Corrected LED macro (disable): Blue LED = Port2 Pin5. 00027 * 00028 * Revision 1.1 2002/10/14 11:49:07 tos 00029 * Initial version in CVS. 00030 * 00031 * * 00032 ****************************************************************************/ 00033 00034 #ifndef CC1010EB_H 00035 #define CC1010EB_H 00036 00037 #include <Chipcon/reg1010.h> // Include register definitions 00038 00039 //********** Constants ************ 00040 #define CC1010EB_CLKFREQ 14746 00041 #define CC1010EB_LOW_CLKFREQ 32 00042 00043 //********** LED macros *********** 00044 #define RLED P1_2 00045 #define YLED P1_3 00046 #define GLED P1_4 00047 #define BLED P2_5 00048 00049 #define LED_ON 0 00050 #define LED_OFF 1 00051 00052 // LED pin output enable macros 00053 #define RLED_OE(x) {P1DIR=(x) ? P1DIR&~0x04 : P1DIR|0x04;} 00054 #define YLED_OE(x) {P1DIR=(x) ? P1DIR&~0x08 : P1DIR|0x08;} 00055 #define GLED_OE(x) {P1DIR=(x) ? P1DIR&~0x10 : P1DIR|0x10;} 00056 #define BLED_OE(x) {P2DIR=(x) ? P2DIR&~0x20 : P2DIR|0x20;} 00057 00058 //********** Switch macros *********** 00059 #define SW1_PRESSED (!P1_7) 00060 #define SW2_PRESSED (!P3_2) 00061 #define SW3_PRESSED (!P3_3) 00062 #define SW4_PRESSED (!P2_4) 00063 00064 //********** Misc macros ************ 00065 #define DCLK P0_2 00066 #define DIO P0_1 00067 #define DCLKIO_OE(b) {P0DIR=(P0DIR&~0x06)|((b)?0x00:0x06);} 00068 00069 00070 #endif //CC1010EB_H

Generated on Fri Aug 27 10:04:02 2004 for Cheap Sensor Network by doxygen 1.3.8