openchronos-ng
opensource firmware for the ez430 chronos
|
00001 /* 00002 Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ 00003 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions 00007 are met: 00008 00009 Redistributions of source code must retain the above copyright 00010 notice, this list of conditions and the following disclaimer. 00011 00012 Redistributions in binary form must reproduce the above copyright 00013 notice, this list of conditions and the following disclaimer in the 00014 documentation and/or other materials provided with the 00015 distribution. 00016 00017 Neither the name of Texas Instruments Incorporated nor the names of 00018 its contributors may be used to endorse or promote products derived 00019 from this software without specific prior written permission. 00020 00021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00022 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00023 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00024 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00025 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00026 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00027 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00028 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00029 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00030 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00031 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00032 */ 00033 00034 #ifndef __PORTS_H__ 00035 #define __PORTS_H__ 00036 00037 /* Button ports */ 00038 #define PORTS_BTN_DOWN_PIN (BIT0) 00039 #define PORTS_BTN_NUM_PIN (BIT1) 00040 #define PORTS_BTN_STAR_PIN (BIT2) 00041 #define PORTS_BTN_BL_PIN (BIT3) 00042 #define PORTS_BTN_UP_PIN (BIT4) 00043 00044 enum ports_buttons { 00045 PORTS_BTN_DOWN = PORTS_BTN_DOWN_PIN, 00046 PORTS_BTN_NUM = PORTS_BTN_NUM_PIN, 00047 PORTS_BTN_STAR = PORTS_BTN_STAR_PIN, 00048 PORTS_BTN_BL = PORTS_BTN_BL_PIN, 00049 PORTS_BTN_UP = PORTS_BTN_UP_PIN, 00050 PORTS_BTN_LDOWN = BIT5, 00051 PORTS_BTN_LNUM = BIT6, 00052 PORTS_BTN_LSTAR = BIT7, 00053 PORTS_BTN_LBL = BIT8, 00054 PORTS_BTN_LUP = BIT9, 00055 }; 00056 00057 /* exclusive for openchronos.c, modules should NOT use this directly */ 00058 volatile enum ports_buttons ports_pressed_btns; 00059 00060 void init_buttons(void); 00061 00062 #endif /* __PORTS_H__ */