scmain.h
来自「psoc_usb的代码,用来小卡测试的.没事下下来」· C头文件 代码 · 共 66 行
H
66 行
//-----------------------------------------------------------------------------
// 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 + =
减小字号Ctrl + -
显示快捷键?