📄 scmain.h
字号:
//-----------------------------------------------------------------------------
// Contents: main module of a simple firmware
//
// Copyright: Inventec Electronics(Tianjin) Co., Ltd.
// $Archive: smallcard.h
// $Date: 2007-08-06
// $Revision: 1.00
//
//-----------------------------------------------------------------------------
// Copyright 2006, xsh.han@itc.inventec
//-----------------------------------------------------------------------------
#ifndef __SMALL_CARD_H__
#define __SMALL_CARD_H__
#include "fx2.h"
#include "fx2regs.h"
#include "absacc.h"
//macro define for debug
//#ifdef __DEBUG__
// #define PDEBUG(fmt, args...) printf(fmt, ##args)
//#else
// #define PDEBUG(fmt, args...)
//#endif
#define BUFF_LENGTH 256
#define true -1
#define false 0
#define DEFAULT_TIMEOUT 0 //default timeout 0s
#define DEFAULT_TIMEOUT_MAX 30 //default timeout MAX value
#define usleep(x) EZUSB_Delay((x/100))
#define DELAY_MS(x) EZUSB_Delay(x)
//----------------------------------------------------------
//macro define for return command param
//----------------------------------------------------------
#define RET_OK 001
#define RET_ERROR 002
#define RET_DONE 003
#define RET_ON 004
#define RET_OFF 005
#define RET_PASS 006
#define RET_FAIL 007
#define RET_BLINKING 008
//----------------------------------------------------------
//command function
//----------------------------------------------------------
struct command_name {
char *command;
int (*fn) (void);
};
//----------------------------------------------------------
//command function param
//----------------------------------------------------------
struct command_param {
char *name;
int val;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -