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