00001 /*This file is prepared for Doxygen automatic documentation generation.*/ 00017 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00018 * 00019 * Redistribution and use in source and binary forms, with or without 00020 * modification, are permitted provided that the following conditions are met: 00021 * 00022 * 1. Redistributions of source code must retain the above copyright notice, this 00023 * list of conditions and the following disclaimer. 00024 * 00025 * 2. Redistributions in binary form must reproduce the above copyright notice, 00026 * this list of conditions and the following disclaimer in the documentation 00027 * and/or other materials provided with the distribution. 00028 * 00029 * 3. The name of Atmel may not be used to endorse or promote products derived 00030 * from this software without specific prior written permission. 00031 * 00032 * 4. This software may only be redistributed and used in connection with an Atmel 00033 * AVR 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 00048 #include "intc.h" 00049 #include "board.h" 00050 00051 #include "tpa6130.h" 00052 #include <avr32/io.h> 00053 00054 00055 #ifndef _CONF_TPA6130_H_ 00056 #define _CONF_TPA6130_H_ 00057 00059 #define TPA6130_MODE TPA6130_MODE_STEREO 00060 00062 #define TPA6130_SIG TPA6130_SIG_DIFF 00063 00064 00065 #ifndef TPA6130_ABDAC 00066 00067 #define TPA6130_ABDAC (&AVR32_ABDAC) 00068 #define TPA6130_DATA0_PIN AVR32_ABDAC_DATA_0_1_PIN 00069 #define TPA6130_DATA0_FUNCTION AVR32_ABDAC_DATA_0_1_FUNCTION 00070 #define TPA6130_DATAN0_PIN AVR32_ABDAC_DATAN_0_1_PIN 00071 #define TPA6130_DATAN0_FUNCTION AVR32_ABDAC_DATAN_0_1_FUNCTION 00072 #define TPA6130_DATA1_PIN AVR32_ABDAC_DATA_1_1_PIN 00073 #define TPA6130_DATA1_FUNCTION AVR32_ABDAC_DATA_1_1_FUNCTION 00074 #define TPA6130_DATAN1_PIN AVR32_ABDAC_DATAN_1_1_PIN 00075 #define TPA6130_DATAN1_FUNCTION AVR32_ABDAC_DATAN_1_1_FUNCTION 00076 00077 // ABDAC PDCA configuration 00078 #define TPA6130_ABDAC_PDCA_PID AVR32_PDCA_PID_ABDAC_TX 00079 00080 // Select the PDCA channel that should be used with the ABDAC 00081 // Available channels are listed in the datasheet. 00082 #define TPA6130_ABDAC_PDCA_CHANNEL 0 00083 00084 // depending on the channel the according interrupt must be selected 00085 #define TPA6130_ABDAC_PDCA_IRQ AVR32_PDCA_IRQ_0 00086 00087 // specify the channel priority 00088 #define TPA6130_ABDAC_PDCA_INT_LEVEL AVR32_INTC_INT3 00089 00090 #endif 00091 00092 // APPLICATION MAX VOLUME 0x3F = 63 = 4dB, minimum is 0x0 = -59dB. 00093 #define TPA6130_APPLICATION_MAX_VOLUME 0x1F 00094 00097 00098 #define TPA6130_ABDAC_GCLK_INPUT_HZ FOSC1 00100 #define TPA6130_TWI_MASTER_SPEED 100000 00101 00102 #endif // _CONF_TPA6130_H_