⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 booster_light.h

📁 ARM9200开发板的ROM boot程序源码1.0
💻 H
字号:
//*----------------------------------------------------------------------------
//*         ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : boosterLight.h
//* Object              : Booster definition
//*
//* 1.0 19/03/01  HI    : Creation
//*----------------------------------------------------------------------------
#ifndef boosterlight_h
#define boosterlight_h

#define AT91C_ROM_BASE  ((char *) 0x100000)
#define AT91C_ROM_SIZE  (128 * 1024)

//*-------------------------------------
//* Peripheral and Interrupt Identifier
//*-------------------------------------

#define FIQ_ID          0         //* Fast Interrupt
#define SYS_ID	        1         //* system peripheral Interrupt
#define MC_ID           1         //* Memory controler
#define PMC_ID          1         //* Power management controler interrupt
#define ST_ID           1         //* System Timer
#define RTC_ID          1         //* Real Time Clock interrupt
#define SW_ID           1         //* Soft Interrupt (generated by the AIC)
#define DBGU_ID         1         //* Debug unit Interrupt
#define PIOA_ID         2         //* PIOA Interrupt
#define PIOB_ID         3         //* PIOB Interrupt
//* RESERVED            4
//* RESERVED            5
#define US0_ID          6         //* USART Channel 0
#define US1_ID          7         //* USART Channel 1
#define US2_ID          8         //* USART Channel 2
#define US3_ID          9         //* USART Channel 3
#define MCI0_ID         10        //* MultimediaCard ID
#define UDP_ID	        11        //* for test on POD+ only USB ID
#define TWI_ID	        12        //*
#define SPI_ID          13        //*
#define SSC0_ID         14        //*
#define SSC1_ID         15        //*
#define SSC2_ID         16        //*
#define TC0_ID	        17        //*
#define TC1_ID	        18        //*
#define TC2_ID	        19        //*
#define TC3_ID	        20        //*
#define TC4_ID	        21        //*
#define TC5_ID	        22        //*
//* RESERVED            23
//* RESERVED            24
#define IRQ0_ID         25        //* External interrupt 0
#define IRQ1_ID         26        //* External interrupt 1
#define IRQ2_ID         27        //* External interrupt 2
#define IRQ3_ID         28        //* External interrupt 3
#define IRQ4_ID         29        //* External interrupt 4
#define IRQ5_ID         30        //* External interrupt 5
#define IRQ6_ID         31        //* External interrupt 6


//*----------
//* ARM Core
//*----------
#include    "periph/arm7tdmi/arm.h"

//*-----------------------------
//* Memory controler Interface
//*-----------------------------
#include    "periph/memc/lib_memc.h"
#define	MEMC_BASE		((AT91PS_MEMC) 0xFFFFFF00)

//*-------------------------------
//* Advanced Interrupt Controller
//*-------------------------------
#include    "periph/aic/lib_aic.h"
#define AIC_BASE        ((AT91PS_AIC) 0xFFFFF000)

//*---------------------------------------------------
//* Advanced Power Management Controller Base Address
//*---------------------------------------------------
#include    "periph/apmc/lib_apmc.h"
#define APMC_BASE        ((AT91PS_APMC) 0xFFFFFC00)

//*--------------
//* System Timer
//*--------------
#include    "periph/system_timer/lib_st.h"
#define ST_BASE         ((AT91PS_SYSTIMER) 0xFFFFFD00)

//*-------------------------
//* Parallel I/O Controller
//*-------------------------
#include    "periph/pio/lib_pio.h"
#define PIOB_BASE       ((AT91PS_PIO ) 0xFFFFF600)
#define PIOA_BASE       ((AT91PS_PIO ) 0xFFFFF400)

#define NB_PIOA	       31        //* Number of PIO A Lines */
#define NB_PIOB        31        //* Number of PIO B Lines */
#define NB_PIOC        31        //* Number of PIO C Lines */

//*---------
//* USARTs
//*---------
#include    "periph/usart2/lib_usart2.h"
#define DBGU_BASE		((AT91PS_USART2) 0xFFFFF200)
#define USART3_BASE     ((AT91PS_USART2) 0xFFFCC000)
#define USART2_BASE     ((AT91PS_USART2) 0xFFFC8000)
#define USART1_BASE     ((AT91PS_USART2) 0xFFFC4000)
#define USART0_BASE     ((AT91PS_USART2) 0xFFFC0000)

//*---------*/
//* UDP     */
//*---------*/
#include    "periph/udp/lib_udp.h"
#define UDP_BASE 	((AT91PS_UDP) 0xFFFB0000)

//*---------
//* TWI
//*---------
#include    "periph\twi\lib_twi.h"
#define TWI_BASE	((AT91PS_TWI) 0xFFFB8000)

//*----------
//* SPI
//*----------
#include    "periph\spi\lib_spi.h"
#define SPI_BASE        ((AT91PS_SPI )0xFFFE0000)


//*------------------
//* Pin Multiplexing
//*------------------
//*----------------------------------------------------
//*          PIO Controller A peripheral A
//*----------------------------------------------------
#define PIOMISO			0         //* SPI Master In Slave
#define PIOMOSI			1         //* SPI Master Out Slave
#define PIOSPCK			2         //* SPI clock signal
#define PIONPCS0		3         //* SPI Peripheral Chip Select 0
#define PIONPCS1		4         //* SPI Peripheral Chip Select 1
#define PIONPCS2		5         //* SPI Peripheral Chip Select 2
#define PIONPCS3		6         //* SPI Peripheral Chip Select 3
#define PIOSDA			7         //* TWI Data I/O
#define PIOSCL			8         //* TWI Clock
#define PIOTXD0			9         //* USART 0 transmit data
#define PIORXD0			10        //* USART 0 receive data
#define PIOSCK0			11        //* USART 0 clock signal
#define PIOCTS0			12        //* USART 0 clear to send
#define PIORTS0			13        //* USART 0 request to send
#define PIORXD1			14        //* USART 1 receive data
#define PIOTXD1			15        //* USART 1 transmit data
#define PIORTS1			16        //* USART 1 request to send
#define PIOCTS1			17        //* USART 1 clear to send
#define PIODTR1			18        //* USART 1 data terminal ready
#define PIODSR1			19        //* USART 1 data send ready
#define PIODCD1			20        //* USART 1 data carrier detect
#define PIORI1			21        //* USART 1 ring indicator
#define PIORXD2			22        //* USART 2 receive data
#define PIOTXD2			23        //* USART 2 transmit data
#define	PIOMCCK			24        //* MMC A clock
#define PIOMCCDA 		25        //* MMC A cmd
#define	PIOMCDA0 		26        //* MMC A data 0
#define	PIOMCDA1 		27        //* MMC A data 1
#define	PIOMCDA2 		28        //* MMC A data 2
#define	PIOMCDA3 		29        //* MMC A data 3
#define PIODRXD			30        //* USART 2 receive data
#define PIODTXD			31        //* USART 2 receive data


//*--------------------------------------------------
//*		   PIO Controller A  peripheral B
//*--------------------------------------------------
//* UNUSED				0   | PERIPH_B        //*
//* UNUSED				1	| PERIPH_B        //*
#define PIOPCK0			2	| PERIPH_B        //*
#define PIOPCK1			3	| PERIPH_B        //*
#define PIOUSUSPEND		4	| PERIPH_B        //* USART 2 signal
#define PIOSCK1			5	| PERIPH_B        //* USART 1 clock signal
#define PIOSCK2			6	| PERIPH_B        //* USART 2 receive data
#define PIOPCK2			7	| PERIPH_B        //*
#define PIOPCK3			8	| PERIPH_B        //*
//* UNUSED				9	| PERIPH_B        //*
#define PIOUTXOEN		10	| PERIPH_B        //*
#define PIOTCLK0		11	| PERIPH_B        //* Timer 0 Clock signal
#define PIOTCLK1		12	| PERIPH_B        //* Timer 1 Clock signal
#define PIOTCLK2		13	| PERIPH_B        //* Timer 2 Clock signal
//* UNUSED				14	| PERIPH_B        //*
//* UNUSED				15	| PERIPH_B        //*
#define PIOTIOA0		16	| PERIPH_B        //* Timer 3 Signal A
#define PIOTIOB0		17	| PERIPH_B        //* Timer 3 Signal B
#define PIOTIOA1		18	| PERIPH_B        //* Timer 3 Signal A
#define PIOTIOB1		19	| PERIPH_B        //* Timer 3 Signal B
#define PIOTIOA2		20	| PERIPH_B        //* Timer 3 Signal A
#define PIOTIOB2		21	| PERIPH_B        //* Timer 3 Signal B
#define PIOURXD			22	| PERIPH_B        //* USB receiver
#define PIOUTXD			23	| PERIPH_B        //* USB transmitter
#define PIOBRTS0		24	| PERIPH_B        //* USART 0 request to send
#define PIOBRTS1		25	| PERIPH_B        //* USART 1 request to send
//* UNUSED				26	| PERIPH_B        //*
#define PIOUEON			27	| PERIPH_B        //*
#define PIORTS2			28	| PERIPH_B        //* USART 2 request to send
#define PIOCTS2			29	| PERIPH_B        //* USART 2 clear to send
//* UNUSED				30	| PERIPH_B        //*
//* UNUSED				31	| PERIPH_B        //*


//*-------------------------------------------------------
//*        PIO Controlle(u_int)r B peripheral A
//*-------------------------------------------------------
#define PIOTF0			0			//*
#define PIOTK0			1			//*
#define PIOTD0			2			//*
#define PIORD0			3			//*
#define PIORK0			4			//*
#define PIORF0			5			//*
#define PIOTF1			6			//*
#define PIOTK1			7			//*
#define PIOTD1			8			//*
#define PIORD1			9			//*
#define PIORK1			10			//*
#define PIORF1			11			//*
#define PIOTF2			12			//*
#define PIOTK2			13			//*
#define PIOTD2			14			//*
#define PIORD2			15			//*
#define PIORK2			16			//*
#define PIORF2			17			//*
#define PIORTS3			18			//*
#define PIOCTS3			19			//*
#define PIOTXD3			20			//*
#define PIORXD3			21			//*
#define PIOSCK3			22			//*
#define PIOFIQ			23			//*
#define	PIOIRQ0			24			//*
#define PIOIRQ1			25			//*
#define	PIOIRQ2 		26			//*
#define	PIOIRQ3			27			//*
#define	PIOIRQ4 		28			//*
#define	PIOIRQ5 		29			//*
#define PIOIRQ6			30			//*
//* UNUSED				31


//*-------------------------------------------------------
//*		   PIO Controller B peripheral B
//*-------------------------------------------------------
#define PIOTIOB3		0	| PERIPH_B        //*
#define PIOTCLK3		1	| PERIPH_B        //*
#define PIOBRTS2		2	| PERIPH_B        //*
#define PIOBRTS3		3	| PERIPH_B        //*
#define PIOBPCK0		4	| PERIPH_B        //*
#define PIOTIOA3		5	| PERIPH_B        //*
#define PIOTIOB4		6	| PERIPH_B        //*
#define PIOTCLK4		7	| PERIPH_B        //*
#define PIOBNPCS1		8	| PERIPH_B        //* SPI Peripheral Chip Select 1
#define PIOBNPCS2		9	| PERIPH_B        //* SPI Peripheral Chip Select 2
#define PIOBPCK1_1		10	| PERIPH_B        //*
#define PIOTIOA4		11	| PERIPH_B        //*
#define PIOTIOB5		12	| PERIPH_B        //*
#define PIOTCLK5		13	| PERIPH_B        //*
#define PIOBNPCS3		14	| PERIPH_B        //* SPI Peripheral Chip Select 2
#define PIOBPCK1_2		15	| PERIPH_B        //*
#define PIOBPCK2		16	| PERIPH_B        //*
#define PIOTIOA5		17	| PERIPH_B        //*
#define PIOMCCDB		18	| PERIPH_B        //* MMC B cmd
#define PIOMCDB0		19	| PERIPH_B        //* MMC B data 0
#define PIOBDTR1		20	| PERIPH_B
//* UNUSED				21	| PERIPH_B
#define PIOBPCK3		22	| PERIPH_B
//* UNUSED				23	| PERIPH_B
#define PIOBTD0			24	| PERIPH_B
#define PIOBTD1			25	| PERIPH_B
#define PIOBTD2			26	| PERIPH_B
#define PIOBDTXD		27	| PERIPH_B
#define PIOMCDB1		28	| PERIPH_B        //* MMC B data 1
#define PIOMCDB2		29	| PERIPH_B        //* MMC B data 2
#define PIOMCDB3		30	| PERIPH_B        //* MMC B data 3
//* UNUSED				31	| PERIPH_B

#define PIOUNUSED		32

#endif	//* boosterLight_h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -