📄 eb40.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 : eb40.h
//* Object : AT91 Evaluation Board Features Definition File
//*
//* 1.0 06/04/00 JPP : Creation
//* 1.1 30/10/00 JPP : Additing the EBI description
//*----------------------------------------------------------------------------
#ifndef eb40_h
#define eb40_h
#include "parts/r40807/lib_r40807.h"
/*---------------------------------------*/
/* AT91EB40 External Memories Definition */
/*---------------------------------------*/
/* Flash Memory : AT29LV1024 64k*16 */
#define FLASH_BASE ((u_int *)0x01000000)
#define FLASH_SIZE (128*1024) /* byte */
/* SRAM : size is depending on the devices fitted on the board */
#define EXT_SRAM_BASE ((u_int *)0x02000000)
#define EXT_SRAM_SIZE (512*1024)
#define EXT_SRAM_LIMIT (EXT_SRAM_BASE+EXT_SRAM_SIZE)
/*---------------------------------------------------------------------------*/
/* EBI Initialization Data */
/*---------------------------------------------------------------------------*/
/* The EBI User Interface Image which is copied by the boot. */
/* 32,768MHz master clock assumed. */
/* That's hardware! Details in the Electrical Datasheet of the AT91 device. */
/* EBI Base Address is added at the end for commodity in copy code. */
/*---------------------------------------------------------------------------*/
#define EBI_CSR_0 ((u_int *)(FLASH_BASE | 0x2529) /* 0x01000000, 16MB, 2 tdf, 16 bits, 3 WS */
#define EBI_CSR_1 ((u_int *)(EXT_SRAM_BASE | 0x2121) /* 0x02000000, 16MB, 0 hold, 16 bits, 1 WS */
#define EBI_CSR_2 ((u_int *)0x20000000) /* unused */
#define EBI_CSR_3 ((u_int *)0x30000000) /* unused */
#define EBI_CSR_4 ((u_int *)0x40000000) /* unused */
#define EBI_CSR_5 ((u_int *)0x50000000) /* unused */
#define EBI_CSR_6 ((u_int *)0x60000000) /* unused */
#define EBI_CSR_7 ((u_int *)0x70000000) /* unused */
/*--------------------------------*/
/* AT91E40 Interfaces Definition */
/*--------------------------------*/
#define LED1 (1<<1) /* Red Led */
#define LED2 (1<<4) /* Amber Led */
#define LED3 (1<<2) /* Green Led */
#define LED_MASK (LED1|LED2|LED3)
#define LED_ON PIO_SET_OUT
#define LED_OFF PIO_CLEAR_OUT
#define SW3_MASK (1<<12) /* SW3 Push Button FIQ */
#define SW4_MASK (1<<5) /* SW4 Push Button */
#define SW5_MASK (1<<9) /* SW5 Push Button IRQ0 */
#define SW_MASK (SW3_MASK|SW4_MASK|SW5_MASK)
#define PIO_SW3 (1<<12)
#define PIO_SW4 (1<<5)
#define PIO_SW5 (1<<9)
#define IRQ_SW3 0 /* SW3 Push Button FIQ */
#define IRQ_SW5 16 /* SW5 Push Button IRQ0 */
/*--------------*/
/* Master Clock */
/*--------------*/
#define MCK 32768000
#define MCKKHz (MCK/1000)
#define MCKMHz (MCK/1000000)
#endif /* eb40_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -