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

📄 error.c

📁 PEAKAUDIO用于EV2板的MCU控制源码
💻 C
字号:
/*************************************************************************

	error.c

  This is the error reporting module. It also contains routines to support
	printing of error messages. Most of the line commands have their own
	error messages, this covers the generic errors that many of the line
	commands can use. 

	Copyright (C) 2001-2004 by Cirrus Logic Inc. All Rights Reserved
*************************************************************************/

#include <8051.h>
#include <intrpt.h>
#include <conio.h>
#include "serial.h"
#include "mystrings.h"
#include "error.h"

extern code char * get_error_string( char error_number )	{

	static code char * code cmnd_arg_error[] = 	{
		str_ErrorColon,
		str_err_BadArg,
		errorStr2,
		errorStr3,
		errorStr4,
		errorStr5,
		errorStr6,
		errorStr7,
		errorStr8,
		errorStr9,
		errorStr10
	};

	return( cmnd_arg_error[ error_number ] );
}

extern void printErr( char error_number ) {
	printStrCode( get_error_string( cERR_ERROR ) );
	printStrCodeC( get_error_string( error_number ) );
}

extern void printArgErr( char error_number )	{
	printStrCode( get_error_string( cERR_ERROR ) );
	printStrCode( get_error_string( cERR_ARGUMENT ) );
	printStrCodeC( get_error_string( error_number ) );
}

extern void printErrString( code char * the_error_string )	{
	printStrCode( get_error_string( cERR_ERROR ) );
	printStrCodeC( the_error_string );
}

extern void printTwoErrorString( code char * first_string, code char * second_string )	{
	printStrCode( get_error_string( cERR_ERROR ) );
	printStrCode( first_string );
	printStrCodeC( second_string );
}

⌨️ 快捷键说明

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