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

📄 ac_halt.c

📁 研一的ucosii在s3c2440的移植源代码
💻 C
字号:
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for UCOS-II                                    *
*                                                                         *
*   MODULE      : AC_HALT.c                                               *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   PROCESSOR   : ARM                                                     *
*                                                                         *
*   TOOL-CHAIN  : SDT 2.51, ADS 1.2 or GCC                                *
*                                                                         *
*   DESCRIPTION :                                                         *
*   This is the ARM mode halt handlers module.                            *
*   Note: This file should be built in ARM mode.                          *
*                                                                         *
**************************************************************************/


#include "frmwrk_cfg.h"
#include "def.h"
#include "frmwrk.h"
#include "consol.h"


/* ********************************************************************* */
/* Global definitions */


/* ********************************************************************* */
/* File local definitions */


/* ********************************************************************* */
/* Local functions */

/*
*********************************************************************************************
*                                       __vHaltx
*
* Description: These exception handlers are used to report a particular exception on the
*              CONSOL & halt.
*
* Arguments  : none.
*
* Return     : none.
*
* Note(s)    : 
*********************************************************************************************
*/
#define UNDEF_EXCEP_APP
#ifdef UNDEF_EXCEP_APP
static void __vHaltUndef(void)
{
    SEND_STR("Undefined instruction exception!!!\n");
    while(1);
}
#endif

static void __vHaltSwi(void)
{
    SEND_STR("SWI exception!!!\n");
    while(1);
}

static void __vHaltPabort(void)
{
    SEND_STR("Pabort exception!!!\n");
    while(1);
}

static void __vHaltDabort(void)
{
    SEND_STR("Dabort exception!!!\n");
    while(1);
}

static void __vHaltFiq(void)
{
    SEND_STR("FIQ exception!!!\n");
    while(1);
}

static void __vHaltIrq(void)
{
    SEND_STR("IRQ exception!!!\n");
    while(1);
}


/* ********************************************************************* */
/* Global functions */

/*
*********************************************************************************************
*                                       HALT_vInitARMModeHandlers
*
* Description: This routine hooks all the Halt exception handlers. Exceptions which are to
*              be handled by the application can be overwritten with the new handler at the
*              appropriate Software hook location.
*
* Arguments  : none.
*
* Return     : none.
*
* Note(s)    : This code should always be compiled in ARM mode.
*********************************************************************************************
*/

void HALT_vInitARMModeHandlers(void)
{
#ifdef UNDEF_EXCEP_APP
    pISR_UNDEF  = (unsigned)__vHaltUndef;
#endif
    pISR_SWI    = (unsigned)__vHaltSwi;
    pISR_PABORT = (unsigned)__vHaltPabort;
    pISR_DABORT = (unsigned)__vHaltDabort;
    pISR_FIQ    = (unsigned)__vHaltFiq;
    pISR_IRQ    = (unsigned)__vHaltIrq;
}


/* ********************************************************************* */

⌨️ 快捷键说明

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