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_LIN_H_ 00047 #define _CONF_LIN_H_ 00048 00049 #include <avr32/io.h> 00050 #include "board.h" 00051 00052 #include "usart.h" 00053 00056 // Lin Version Supported LIN_13 or LIN_20 00057 #define USART_LIN_VERSION LIN_2x 00058 00059 00060 // Usart Used for LIN Support 00061 #define USART_LIN_NODE0_INSTANCE AVR32_USART1 00062 // IRQ for the usart 00063 #define USART_LIN_NODE0_USART_IRQ AVR32_USART1_IRQ 00064 // IRQ level for the usart 00065 #define USART_LIN_NODE0_USART_IRQ_LEVEL AVR32_INTC_INT0 00066 // Pins and Functions used for USART1 00067 #define USART_LIN_NODE0_RX_PIN AVR32_USART1_RXD_0_0_PIN 00068 #define USART_LIN_NODE0_RX_FUNCTION AVR32_USART1_RXD_0_0_FUNCTION 00069 #define USART_LIN_NODE0_TX_PIN AVR32_USART1_TXD_0_0_PIN 00070 #define USART_LIN_NODE0_TX_FUNCTION AVR32_USART1_TXD_0_0_FUNCTION 00071 00072 // PDCA Channel Used for Transmission 00073 #define USART_LIN_NODE0_TX_PDCA_CHANNEL 0 00075 #define USART_LIN_NODE0_TX_PDCA_IRQ_GROUP AVR32_PDCA_IRQ_GROUP0 00076 // PDCA Channel Used for Reception 00077 #define USART_LIN_NODE0_RX_PDCA_CHANNEL 1 00079 #define USART_LIN_NODE0_RX_PDCA_IRQ_GROUP AVR32_PDCA_IRQ_GROUP0 00080 // IRQ of PDCA Channel Used for Transmission 00081 #define USART_LIN_NODE0_PDCA_TX_IRQ AVR32_PDCA_IRQ_0 00082 // IRQ level of PDCA Channel Used for Transmission 00083 #define USART_LIN_NODE0_PDCA_TX_IRQ_LEVEL AVR32_INTC_INT0 00084 // IRQ of PDCA Channel Used for Reception 00085 #define USART_LIN_NODE0_PDCA_RX_IRQ AVR32_PDCA_IRQ_1 00086 // IRQ level of PDCA Channel Used for Reception 00087 #define USART_LIN_NODE0_PDCA_RX_IRQ_LEVEL AVR32_INTC_INT0 00088 // PDCA PID For IRQ of Usart selected in transmission 00089 #define USART_LIN_NODE0_PDCA_PID_TX AVR32_PDCA_PID_USART1_TX 00090 // PDCA PID For IRQ of Usart selected in reception 00091 #define USART_LIN_NODE0_PDCA_PID_RX AVR32_PDCA_PID_USART1_RX 00092 00093 // Usart Used for LIN Support 00094 #define USART_LIN_NODE1_INSTANCE AVR32_USART0 00095 // IRQ for the usart 00096 #define USART_LIN_NODE1_USART_IRQ AVR32_USART0_IRQ 00097 // IRQ level for the usart 00098 #define USART_LIN_NODE1_USART_IRQ_LEVEL AVR32_INTC_INT0 00099 // Pins and Functions used for USART0 00100 #define USART_LIN_NODE1_RX_PIN AVR32_USART0_RXD_0_1_PIN 00101 #define USART_LIN_NODE1_RX_FUNCTION AVR32_USART0_RXD_0_1_FUNCTION 00102 #define USART_LIN_NODE1_TX_PIN AVR32_USART0_TXD_0_1_PIN 00103 #define USART_LIN_NODE1_TX_FUNCTION AVR32_USART0_TXD_0_1_FUNCTION 00104 // PDCA Channel Used for Transmission 00105 #define USART_LIN_NODE1_TX_PDCA_CHANNEL 2 00107 #define USART_LIN_NODE1_TX_PDCA_IRQ_GROUP AVR32_PDCA_IRQ_GROUP0 00108 // PDCA Channel Used for Reception 00109 #define USART_LIN_NODE1_RX_PDCA_CHANNEL 3 00111 #define USART_LIN_NODE1_RX_PDCA_IRQ_GROUP AVR32_PDCA_IRQ_GROUP0 00112 // IRQ of PDCA Channel Used for Transmission 00113 #define USART_LIN_NODE1_PDCA_TX_IRQ AVR32_PDCA_IRQ_2 00114 // IRQ level of PDCA Channel Used for Transmission 00115 #define USART_LIN_NODE1_PDCA_TX_IRQ_LEVEL AVR32_INTC_INT0 00116 // IRQ of PDCA Channel Used for Reception 00117 #define USART_LIN_NODE1_PDCA_RX_IRQ AVR32_PDCA_IRQ_3 00118 // IRQ level of PDCA Channel Used for Reception 00119 #define USART_LIN_NODE1_PDCA_RX_IRQ_LEVEL AVR32_INTC_INT0 00120 // PDCA PID For IRQ of Usart selected in transmission 00121 #define USART_LIN_NODE1_PDCA_PID_TX AVR32_PDCA_PID_USART0_TX 00122 // PDCA PID For IRQ of Usart selected in reception 00123 #define USART_LIN_NODE1_PDCA_PID_RX AVR32_PDCA_PID_USART0_RX 00124 00125 00126 #endif // _CONF_USART_LIN_H_