get_ebi.h

来自「ARM入门的好帮手.包含了从简单到相对较复杂的程序.」· C头文件 代码 · 共 62 行

H
62
字号
//*----------------------------------------------------------------------------
//*      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           : get_ebi.h
//* Object              : get the chip ID
//*
//* 1.0 03/11/00 JPP    : Creation
//*----------------------------------------------------------------------------

#ifndef get_ebi_h
#define get_ebi_h

//* --------------------------- include file ----------------------------------

//* Periph description
#include    "periph/ebi/lib_ebi.h"
#include    "drivers/flash/lib_flash_at49.h"
#include    "drivers/flash/lib_flash_at29.h"


extern const FlashAt49BVDef FlashTable[NB_FLASH_SUPPORTED];
extern const FlashAt49BVDef FlashTableAT29[NB_FLASH_AT29_SUPPORTED];

/*---------------------------  Constants definition -------------------------*/

#define     RAM_VALUE       0x55AAAA55
#define     RAM_STEP        (1024*8)    /* In word (4 bytes) */
#define     RAM_MODULO      1
#define     NO_RAM_MODULO   0

#define     NB_CHIP_SELEC           8

#define     EBI_MEMORY_TYPE_UNKNOWN 	 0
#define     EBI_MEMORY_TYPE_RAM     	 1
#define     EBI_MEMORY_TYPE_FLASH_AT49   2
#define     EBI_MEMORY_TYPE_FLASH_AT29   3

/*---------------------------  Structure definition -------------------------*/
 typedef struct ebi_def
 {
     unsigned char type ;
     unsigned int  start_address;
     unsigned int  size;
     FlashAt49BVDef *flash_type;
     char *        name;
} ebi_def ;

/*---------------------------  Function Prototyping -------------------------*/

extern void get_ebi_csr( u_int ebi, char * string );

extern void get_ebi_mem_type( u_int ebi, char * string, ebi_def* map_conf );

extern int  get_ebi_memory_csr(char * address, ebi_def * map_conf);

#endif /* get_ebi_h */

⌨️ 快捷键说明

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