NIBO Library  2.11
nibo/iodefs_nibo2.h
gehe zur Dokumentation dieser Datei
00001 /*  BSD-License:
00002 
00003 Copyright (c) 2007 by Nils Springob, nicai-systems, Germany
00004 
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without modification,
00008 are permitted provided that the following conditions are met:
00009 
00010   * Redistributions of source code must retain the above copyright notice,
00011     this list of conditions and the following disclaimer.
00012   * Redistributions in binary form must reproduce the above copyright notice,
00013     this list of conditions and the following disclaimer in the documentation
00014     and/or other materials provided with the distribution.
00015   * Neither the name nicai-systems nor the names of its contributors may be
00016     used to endorse or promote products derived from this software without
00017     specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00022 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00023 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00024 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00025 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00027 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00028 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030 
00031 */
00032 
00041 #define IO_LEDS_RED_PORT  PORTE
00042 #define IO_LEDS_RED_MASK  0xff
00043 #define IO_LEDS_RED_DDR   DDRE
00044 
00046 #define IO_LEDS_GREEN_PORT  PORTC
00047 #define IO_LEDS_GREEN_MASK  0xff
00048 #define IO_LEDS_GREEN_DDR   DDRC
00049 
00050 
00052 #define IO_LED_WHITE_PORT  PORTB
00053 #define IO_LED_WHITE_BIT   5
00054 #define IO_LED_WHITE_DDR   DDRB
00055 
00057 #define IO_DISP_LIGHT_PORT  PORTB
00058 #define IO_DISP_LIGHT_BIT   6
00059 #define IO_DISP_LIGHT_DDR   DDRB
00060 
00062 #define IO_LED_RG_PORT  PORTB
00063 #define IO_LED_RG_BIT   7
00064 #define IO_LED_RG_DDR   DDRB
00065 
00067 #define IO_AUDIO_PORT  PORTB
00068 #define IO_AUDIO_BIT   4
00069 #define IO_AUDIO_DDR   DDRB
00070 
00071 
00072 
00074 #define IO_LINE_FLOOR_EN       IO_LINE_FLOOR_EN
00075 #define IO_LINE_FLOOR_EN_PORT  PORTF
00076 #define IO_LINE_FLOOR_EN_BIT   6
00077 #define IO_LINE_FLOOR_EN_DDR   DDRF
00078 
00079 
00081 #define AN_FLOOR_R    0        
00082 #define AN_FLOOR_L    1        
00083 #define AN_LINE_L     2        
00084 #define AN_LINE_R     3        
00085 #define AN_VBAT       7        
00089 #define IO_DISPLAY_RS       IO_DISPLAY_RS
00090 #define IO_DISPLAY_RS_PORT  PORTG
00091 #define IO_DISPLAY_RS_BIT   3
00092 #define IO_DISPLAY_RS_DDR   DDRG
00093 
00095 #define IO_DISPLAY_RW       IO_DISPLAY_RW
00096 #define IO_DISPLAY_RW_PORT  PORTG
00097 #define IO_DISPLAY_RW_BIT   4
00098 #define IO_DISPLAY_RW_DDR   DDRG
00099 
00101 #define IO_DISPLAY_EN       IO_DISPLAY_EN
00102 #define IO_DISPLAY_EN_PORT  PORTG
00103 #define IO_DISPLAY_EN_BIT   2
00104 #define IO_DISPLAY_EN_DDR   DDRG
00105 
00107 #define IO_DISPLAY_CS1       IO_DISPLAY_CS1
00108 #define IO_DISPLAY_CS1_PORT  PORTG
00109 #define IO_DISPLAY_CS1_BIT   0
00110 #define IO_DISPLAY_CS1_DDR   DDRG
00111 
00113 #define IO_DISPLAY_CS2       IO_DISPLAY_CS2
00114 #define IO_DISPLAY_CS2_PORT  PORTG
00115 #define IO_DISPLAY_CS2_BIT   1
00116 #define IO_DISPLAY_CS2_DDR   DDRG
00117 
00119 #define IO_DISPLAY_RST       IO_DISPLAY_RST
00120 #define IO_DISPLAY_RST_PIN   PINB
00121 #define IO_DISPLAY_RST_PORT  PORTB
00122 #define IO_DISPLAY_RST_BIT   0
00123 #define IO_DISPLAY_RST_DDR   DDRB
00124 
00126 #define IO_DISPLAY_PORT  PORTA
00127 #define IO_DISPLAY_PIN   PINA
00128 #define IO_DISPLAY_DDR   DDRA
00129 
00130 
00132 #define IO_EXT_A_PORT  PORTD
00133 #define IO_EXT_A_PIN   PIND
00134 #define IO_EXT_A_BIT   6
00135 #define IO_EXT_A_DDR   DDRD
00136 
00138 #define IO_EXT_B_PORT  PORTD
00139 #define IO_EXT_B_PIN   PIND
00140 #define IO_EXT_B_BIT   5
00141 #define IO_EXT_B_DDR   DDRD
00142 
00144 #define IO_EXT_C_PORT  PORTD
00145 #define IO_EXT_C_PIN   PIND
00146 #define IO_EXT_C_BIT   3
00147 #define IO_EXT_C_DDR   DDRD
00148 
00150 #define IO_EXT_D_PORT  PORTD
00151 #define IO_EXT_D_PIN   PIND
00152 #define IO_EXT_D_BIT   2
00153 #define IO_EXT_D_DDR   DDRD
00154 
00156 #define IO_RESET_CO_PORT  PORTD
00157 #define IO_RESET_CO_BIT   7
00158 #define IO_RESET_CO_DDR   DDRD
00159 
00160 
00162 #define IO_INPUT_1       IO_INPUT_1
00163 #define IO_INPUT_1_PORT  PORTD
00164 #define IO_INPUT_1_PIN   PIND
00165 #define IO_INPUT_1_BIT   4
00166 #define IO_INPUT_1_DDR   DDRD
00167 
00169 #define IO_INPUT_2       IO_INPUT_2
00170 #define IO_INPUT_2_PORT  PORTF
00171 #define IO_INPUT_2_PIN   PINF
00172 #define IO_INPUT_2_BIT   5
00173 #define IO_INPUT_2_DDR   DDRF
00174 
00176 #define IO_INPUT_3       IO_INPUT_3
00177 #define IO_INPUT_3_PORT  PORTF
00178 #define IO_INPUT_3_PIN   PINF
00179 #define IO_INPUT_3_BIT   4
00180 #define IO_INPUT_3_DDR   DDRF
00181 
00182 
00184 #define IO_ISP_SCK_PORT  PORTB
00185 #define IO_ISP_SCK_BIT   1
00186 #define IO_ISP_SCK_DDR   DDRB
00187 
00189 #define IO_ISP_MOSI_PORT  PORTB
00190 #define IO_ISP_MOSI_BIT   2
00191 #define IO_ISP_MOSI_DDR   DDRB
00192 
00194 #define IO_ISP_MISO_PORT  PORTB
00195 #define IO_ISP_MISO_PIN   PINB
00196 #define IO_ISP_MISO_BIT   3
00197 #define IO_ISP_MISO_DDR   DDRB
00198 
00200 #define IO_ISP_SS         IO_DISPLAY_RST
00201 
00203 #define IO_I2C_SDA_PORT  PORTD
00204 #define IO_I2C_SDA_PIN   PIND
00205 #define IO_I2C_SDA_BIT   1
00206 #define IO_I2C_SDA_DDR   DDRD
00207 
00209 #define IO_I2C_SCL_PORT  PORTD
00210 #define IO_I2C_SCL_PIN   PIND
00211 #define IO_I2C_SCL_BIT   0
00212 #define IO_I2C_SCL_DDR   DDRD
00213 
00214 
00216 #define I2C_BUF_SIZE 20
00217 #define I2C_TWBR_INIT 72   /* 100 kHz */
00218 //#define I2C_TWBR_INIT 12   /* 400 kHz */
00219 
00220 
00221 
00223 #define IRCO_I2C_ID 42
00224 
00226 #define MOTCO_I2C_ID 44
00227 
00229 #define COPRO_I2C_ID 46
00230 
00231 

Erzeugt am Fre Jun 3 2011 15:48:39 für NIBO Library von doxygen 1.7.4-20110426