📄 halhalt.c
字号:
/* ============================================================================ Project Name : jayaCard Module Name : proto/hal/simu/halhalt.c Version : $Id: halhalt.c,v 1.10 2004/01/11 09:56:33 dgil Exp $ Description: halt the processor in a secure way The Original Code is jayaCard code. The Initial Developer of the Original Code is Gilles Dumortier. Portions created by the Initial Developer are Copyright (C) 2002-2004 the Initial Developer. All Rights Reserved. Contributor(s): This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see http://www.gnu.org/licenses/gpl.html History Rev Description 011903 dgil wrote it from scratch ============================================================================*/#include "precomp.h"/* ========================================================================= __hal_halt() Halt the processor. An hardware reset is required to restart the COS ========================================================================= */void __hal_halt(void){ if (lasterr==SUCCESS) BIOS_SETERR(ERR_FAULT); /* save the EEPROM content */ (void)__simu_save_eeprom(EEPROM_FILE_LATEST); (void)__simu_save_XML_eeprom(EEPROM_FILE_LATEST); /* dump the diff */ #ifdef INTROSPECTION INTROSPECTION(); #endif /* display a message in the console */ LOG("HALT","*** HAL_HALT() - processor halted ! - press CTRL-BREAK to exit ..."); /* stop the program */ while (1);}/* ========================================================================= That's all folks ! ========================================================================= */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -