read_ebi.c

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

C
42
字号
//*----------------------------------------------------------------------------
//*      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           : read_ebi.c
//* Object              : read memory and check abort
//*                       This function is assosiate to the cstatup file and
//*                       MUST BE compile in THUMB mode
//*
//* 1.0 07/11/00 JPP    : Creation
//*----------------------------------------------------------------------------


//* This variable MUST BE  volatile for good execution it's modified by the
//* DATA ABORT exeption
volatile int data_abort;

//*----------------------------------------------------------------------------
//* Function Name       : get_mem_test_abort
//* Object              : Read EBI Chip Select and check if data abort
//* Input Parameters    : <*pt_data> address to read
//* Output Parameters   : 0 if no data abort
//*                       data_abort is set by DATA ABORT exeption to abort pc
//*                       value abort ge
//*----------------------------------------------------------------------------
int get_mem_test_abort ( unsigned int *pt_data)
{
    int data;
     //* Set no DATA ABORT
     data_abort= 0;
     // read the memory value
     data = *pt_data;
     //* Return if data abort
     return  (data_abort);
}
//* end of file

⌨️ 快捷键说明

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