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

📄 exception.c

📁 AT91所有开发板的资料 AT91所有开发板的资料
💻 C
字号:
/***************************************************************************   Copyright ARM Limited 1999 - 2000.  All rights reserved.****************************************************************************	$Id: exception.c,v 1.4 2000/01/12 16:08:01 mquinn Exp $****************************************************************************/#include "uhal.h"extern void print_header(void);extern void print_end(void);char *test_name = "Exception Test for lib C\n";char *test_ver = "Program Version 1.0\n";int main(int argc, int *argv[]){    int result;    infoType platformInfo;    print_header();    uHALr_printf("*** Division by zero exception test for lib C ***\n\n");    uHALr_GetPlatformInfo(&platformInfo);    uHALr_printf("platform Id : 0x%08X\n", platformInfo.platformId);    uHALr_printf("memory Size : 0x%08X\n", platformInfo.memSize);    uHALr_printf("cpu ID      : 0x%08X\n\n", platformInfo.cpuId);#if USE_C_LIBRARY == 0    result = 1;    uHALr_printf("Sorry, this image has not been built to use the C library\n");#else    // Deliberatly cause a divide-by-zero exception.    result = 1 / 0;#endif    print_end();    return (OK);}// End of file - exception.c

⌨️ 快捷键说明

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