00001 /*This file is prepared for Doxygen automatic documentation generation.*/ 00016 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00017 * 00018 * Redistribution and use in source and binary forms, with or without 00019 * modification, are permitted provided that the following conditions are met: 00020 * 00021 * 1. Redistributions of source code must retain the above copyright notice, this 00022 * list of conditions and the following disclaimer. 00023 * 00024 * 2. Redistributions in binary form must reproduce the above copyright notice, 00025 * this list of conditions and the following disclaimer in the documentation 00026 * and/or other materials provided with the distribution. 00027 * 00028 * 3. The name of ATMEL may not be used to endorse or promote products derived 00029 * from this software without specific prior written permission. 00030 * 00031 * 4. ATMEL grants developer a non-exclusive, limited license to use the Software 00032 * as a development platform solely in connection with an Atmel AVR product 00033 * ("Atmel Product"). 00034 * 00035 * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED 00036 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00037 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00038 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00039 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00040 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00041 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00042 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00043 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00044 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00045 */ 00046 00047 #ifndef _CONF_CS2200_H_ 00048 #define _CONF_CS2200_H_ 00049 00050 #include "board.h" 00051 00052 #if (defined __AT32UC3A3256__) || (defined __AVR32_UC3A3256__) 00053 # define CS2200_TWI (&AVR32_TWIM0) 00054 #else 00055 # define CS2200_TWI (&AVR32_TWI) 00056 #endif 00057 #define CS2200_TWI_SCL_PIN AVR32_TWI_SCL_0_0_PIN 00058 #define CS2200_TWI_SCL_FUNCTION AVR32_TWI_SCL_0_0_FUNCTION 00059 #define CS2200_TWI_SDA_PIN AVR32_TWI_SDA_0_0_PIN 00060 #define CS2200_TWI_SDA_FUNCTION AVR32_TWI_SDA_0_0_FUNCTION 00061 00066 #define CS2200_INTERFACE CS2200_INTERFACE_TWI 00067 00069 #if (defined CS2200_INTERFACE) && (defined CS2200_INTERFACE_TWI) && (defined CS2200_INTERFACE_SPI) 00070 # if CS2200_INTERFACE == CS2200_INTERFACE_TWI 00071 # elif CS2200_INTERFACE == CS2200_INTERFACE_SPI 00072 # error The SPI interface is not supported. 00073 # else 00074 # error CS2200_INTERFACE is not correctly defined 00075 # endif 00076 #endif 00077 00079 #define CS2200_TWI_SLAVE_ADDRESS CS2200_TWI_ADDR 00080 00082 #define CS2200_TWI_MASTER_SPEED 1000 // low clock is required during the startup of the CPU on the internal RC oscillator 00083 00085 #define CS2200_SPI_MASTER_SPEED 50000 00086 00088 #define CS2200_NB_TRIES 10 00089 00090 00091 #endif // _CONF_CS2200_H_