NIBO Library 2.11
|
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 00040 #define IO_LEDS_RED_PORT PORTE 00041 #define IO_LEDS_RED_MASK 0xfc 00042 #define IO_LEDS_RED_DDR DDRE 00043 00045 #define IO_LEDS_GREEN_PORT PORTC 00046 #define IO_LEDS_GREEN_MASK 0xfc 00047 #define IO_LEDS_GREEN_DDR DDRC 00048 00050 #define IO_LED_WHITE_PORT PORTB 00051 #define IO_LED_WHITE_BIT 5 00052 #define IO_LED_WHITE_DDR DDRB 00053 00055 #define IO_DISP_LIGHT_PORT PORTB 00056 #define IO_DISP_LIGHT_BIT 6 00057 #define IO_DISP_LIGHT_DDR DDRB 00058 00059 00060 00062 #define IO_LINE_FLOOR_EN IO_LINE_FLOOR_EN 00063 #define IO_LINE_FLOOR_EN_PORT PORTG 00064 #define IO_LINE_FLOOR_EN_BIT 0 00065 #define IO_LINE_FLOOR_EN_DDR DDRG 00066 00067 00069 #define AN_FLOOR_R 0 00070 #define AN_FLOOR_L 1 00071 #define AN_LINE_L 2 00072 #define AN_LINE_R 3 00073 #define AN_VBAT 7 00077 #define IO_DISPLAY_RS IO_DISPLAY_RS 00078 #define IO_DISPLAY_RS_PORT PORTG 00079 #define IO_DISPLAY_RS_BIT 3 00080 #define IO_DISPLAY_RS_DDR DDRG 00081 00083 #define IO_DISPLAY_RW IO_DISPLAY_RW 00084 #define IO_DISPLAY_RW_PORT PORTG 00085 #define IO_DISPLAY_RW_BIT 4 00086 #define IO_DISPLAY_RW_DDR DDRG 00087 00089 #define IO_DISPLAY_EN IO_DISPLAY_EN 00090 #define IO_DISPLAY_EN_PORT PORTG 00091 #define IO_DISPLAY_EN_BIT 2 00092 #define IO_DISPLAY_EN_DDR DDRG 00093 00095 #define IO_DISPLAY_CS1 IO_DISPLAY_CS1 00096 #define IO_DISPLAY_CS1_PORT PORTB 00097 #define IO_DISPLAY_CS1_BIT 4 00098 #define IO_DISPLAY_CS1_DDR DDRB 00099 00101 #define IO_DISPLAY_CS2 IO_DISPLAY_CS2 00102 #define IO_DISPLAY_CS2_PORT PORTB 00103 #define IO_DISPLAY_CS2_BIT 7 00104 #define IO_DISPLAY_CS2_DDR DDRB 00105 00107 #define IO_DISPLAY_RST IO_DISPLAY_RST 00108 #define IO_DISPLAY_RST_PORT PORTB 00109 #define IO_DISPLAY_RST_BIT 0 00110 #define IO_DISPLAY_RST_DDR DDRB 00111 00113 #define IO_DISPLAY_PORT PORTA 00114 #define IO_DISPLAY_PIN PINA 00115 #define IO_DISPLAY_DDR DDRA 00116 00117 00119 #define IO_RESET_A_PORT PORTD 00120 #define IO_RESET_A_BIT 4 00121 #define IO_RESET_A_DDR DDRD 00122 00124 #define IO_RESET_B_PORT PORTD 00125 #define IO_RESET_B_BIT 5 00126 #define IO_RESET_B_DDR DDRD 00127 00129 #define IO_RESET_5_PORT PORTD 00130 #define IO_RESET_5_BIT 6 00131 #define IO_RESET_5_DDR DDRD 00132 00134 #define IO_RESET_3_PORT PORTD 00135 #define IO_RESET_3_BIT 7 00136 #define IO_RESET_3_DDR DDRD 00137 00138 00140 #define IO_ISP_SCK_PORT PORTB 00141 #define IO_ISP_SCK_BIT 1 00142 #define IO_ISP_SCK_DDR DDRB 00143 00145 #define IO_ISP_MOSI_PORT PORTB 00146 #define IO_ISP_MOSI_BIT 2 00147 #define IO_ISP_MOSI_DDR DDRB 00148 00150 #define IO_ISP_MISO_PORT PORTB 00151 #define IO_ISP_MISO_PIN PINB 00152 #define IO_ISP_MISO_BIT 3 00153 #define IO_ISP_MISO_DDR DDRB 00154 00155 00157 #define I2C_BUF_SIZE 16 00158 //#define I2C_TWBR_INIT 72 /* 100 kHz */ 00159 #define I2C_TWBR_INIT 12 /* 400 kHz */ 00160 00161 00163 #define IRCO_I2C_ID 42 00164 00166 #define MOTCO_I2C_ID 44 00167