4 * This file is part of BeRTOS.
6 * Bertos is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2010 Develer S.r.l. (http://www.develer.com/)
33 * \author Stefano Fedrigo <aleph@develer.com>
39 #include <cpu/detect.h>
40 #include <cfg/compiler.h>
43 * Peripherals IDs, same as interrupt numbers.
45 #define SUPC_ID INT_SUPC ///< Supply Controller (SUPC)
46 #define RSTC_ID INT_RSTC ///< Reset Controller (RSTC)
47 #define RTC_ID INT_RTC ///< Real Time Clock (RTC)
48 #define RTT_ID INT_RTT ///< Real Time Timer (RTT)
49 #define WDT_ID INT_WDT ///< Watchdog Timer (WDT)
50 #define PMC_ID INT_PMC ///< Power Management Controller (PMC)
51 #define EFC_ID INT_EFC ///< Enhanced Flash Controller (EFC)
52 #define UART0_ID INT_UART0 ///< UART 0 (UART0)
53 #define UART1_ID INT_UART1 ///< UART 1 (UART1)
54 #define UART2_ID INT_UART2 ///< UART 0 (UART0)
55 #define UART3_ID INT_UART3 ///< UART 1 (UART1)
56 #define PIOA_ID INT_PIOA ///< Parallel I/O Controller A (PIOA)
57 #define PIOB_ID INT_PIOB ///< Parallel I/O Controller B (PIOB)
58 #define PIOC_ID INT_PIOC ///< Parallel I/O Controller C (PIOC)
59 #define US0_ID INT_USART0 ///< USART 0 (USART0)
60 #define US1_ID INT_USART1 ///< USART 1 (USART1)
61 #define TWI0_ID INT_TWI0 ///< Two Wire Interface 0 (TWI0)
62 #define TWI1_ID INT_TWI1 ///< Two Wire Interface 1 (TWI1)
63 #define SPI0_ID INT_SPI ///< Serial Peripheral Interface (SPI)
64 #define TC0_ID INT_TC0 ///< Timer/Counter 0 (TC0)
65 #define TC1_ID INT_TC1 ///< Timer/Counter 1 (TC1)
66 #define TC2_ID INT_TC2 ///< Timer/Counter 2 (TC2)
67 #define TC3_ID INT_TC3 ///< Timer/Counter 3 (TC3)
68 #define TC4_ID INT_TC4 ///< Timer/Counter 4 (TC4)
69 #define TC5_ID INT_TC5 ///< Timer/Counter 5 (TC5)
70 #define ADC_ID INT_ADC ///< Analog To Digital Converter (ADC)
71 #define DACC_ID INT_DACC ///< Digital To Analog Converter (DACC)
72 #define PWM_ID INT_PWM ///< Pulse Width Modulation (PWM)
75 * Hardware features for drivers.
77 #define USART_HAS_PDC 1
80 #include "sam3_sysctl.h"
82 #include "sam3_memmap.h"
83 #include "sam3_ints.h"
85 #include "sam3_nvic.h"
86 #include "sam3_uart.h"
89 #include "sam3_flash.h"
111 #if CPU_CM3_AT91SAM3U