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 #if (UC3A3 || UC3C || UC3L) 00052 # define CS2200_TWI (&AVR32_TWIM0) 00053 #else 00054 # define CS2200_TWI (&AVR32_TWI) 00055 #endif 00056 00061 #define CS2200_INTERFACE CS2200_INTERFACE_TWI 00062 00064 #if CS2200_INTERFACE == CS2200_INTERFACE_TWI 00065 #elif CS2200_INTERFACE == CS2200_INTERFACE_SPI 00066 # error The SPI interface is not supported. 00067 #else 00068 # error CS2200_INTERFACE is not correctly defined 00069 #endif 00070 00072 #define CS2200_TWI_SLAVE_ADDRESS CS2200_TWI_ADDR 00073 00075 #define CS2200_TWI_MASTER_SPEED 1000 // low clock is required during the startup of the CPU on the internal RC oscillator 00076 00078 #define CS2200_SPI_MASTER_SPEED 50000 00079 00081 #define CS2200_NB_TRIES 10 00082 00083 #endif // _CONF_CS2200_H_