📄 auto.h
字号:
//----------------------------------------------------------------------------------------------------
// ID Code : Auto.h No.0001
// Update Note :
//
//----------------------------------------------------------------------------------------------------
//--------------------------------------------------
// Minumum Noise Margin
//--------------------------------------------------
#define _MIN_NOISE_MARGIN 0x30
//--------------------------------------------------
// Color Source Select for Detection
//--------------------------------------------------
#define _COLORS_BLUE 0x00
#define _COLORS_GREEN 0x01
#define _COLORS_RED 0x02
#define _COLORS_ALL 0x03
#define _COLOR_SELECT _COLORS_ALL
//--------------------------------------------------
// Definations of Measure Color
//--------------------------------------------------
#define _MEASURE_COLORS_MIN 0x00
#define _MEASURE_COLORS_MAX 0x01
//--------------------------------------------------
// White Balance Max/Min Level Settings
//--------------------------------------------------
#define _WHITEBALANCE_MAX_LEVEL 242
#define _WHITEBALANCE_MIN_LEVEL 2
//--------------------------------------------------
// Hardware Auto Phase Step
//--------------------------------------------------
#define _HWAUTO_STEP_1 0x00
#define _HWAUTO_STEP_2 0x01
#define _HWAUTO_STEP_4 0x02
#define _HWAUTO_STEP_8 0x03
#define _HWAUTO_STEP_16 0x04
#define _HWAUTO_STEP _HWAUTO_STEP_2
//--------------------------------------------------
// Auto Clock Precision (Unit in Clock Number)
//--------------------------------------------------
#define _AUTO_CLOCK_PRECISION_1 1
#define _AUTO_CLOCK_PRECISION_2 2
#define _AUTO_CLOCK_PRECISION _AUTO_CLOCK_PRECISION_2
//--------------------------------------------------
// Definitions of Auto Function
//--------------------------------------------------
#define _ERROR_SUCCESS 0x00
#define _ERROR_FINISH 0x40
#define _ERROR_ABORT 0x80
#define _ERROR_INPUT 0xff
#define _ERROR_PHASE 0xfe
//----------------------------------------------------------------------------------------------------
#ifdef __AUTO__
//--------------------------------------------------
// Global Variables
//--------------------------------------------------
WORD idata usHStartPos;
WORD idata usHEndPos;
WORD idata usVStartPos;
WORD idata usVEndPos;
//--------------------------------------------------
// Function Prototypes
//--------------------------------------------------
BYTE CAutoDoAutoConfig(void);
BYTE CAutoWaitFinish(void);
BYTE CAutoWaitForIVS(BYTE ucTimes);
BYTE CAutoMeasurePositionH(BYTE ucNoiseMarginH);
BYTE CAutoMeasurePositionV(BYTE ucNoiseMarginV);
LWORD CAutoPhaseSearch(BYTE ucSelColor, BYTE ucSelStep, BYTE ucSelStepNum, BYTE ucSelStepStart, BYTE *ucPhaseResult);
BYTE CAutoReadPhaseInfo(BYTE ucColor);
BYTE CAutoDoAutoClock(void);
BYTE CAutoDoAutoPhase(void);
BYTE CAutoDoAutoPosition(void);
BYTE CAutoDoWhiteBalance(void);
BYTE CAutoTuneBalance(void);
BYTE CAutoMeasureColor(BYTE ucColor, BYTE ucPar, BYTE *pMargin);
BYTE CAutoTuneAdcGain(BYTE ucColor, BYTE *pMargin);
BYTE CAutoTuneAdcOffset(BYTE ucColor, BYTE *pMargin);
BYTE CAutoChangeAdcGain(BYTE ucColor, BYTE ucDelta, BYTE ucInc);
BYTE CAutoChangeAdcOffset(BYTE ucColor, BYTE ucDelta, BYTE ucInc);
#else
//--------------------------------------------------
// Extern Global Variables
//--------------------------------------------------
//--------------------------------------------------
// Extern Function Prototypes
//--------------------------------------------------
extern BYTE CAutoDoAutoConfig(void);
extern BYTE CAutoDoWhiteBalance(void);
#endif
//----------------------------------------------------------------------------------------------------
#define HWAUTOSTEPNUM(x) x
#define HWAUTOSTEPSTART(x) x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -