📄 flavors.c
字号:
/*
$Workfile: flavors.c $
$Revision: 1.22 $
$Date: Jan 25 2006 12:06:52 $
*/
//******************************************************************
//
// Copyright (C) 2002. GENESIS MICROCHIP INC.
// All rights reserved. No part of this program may be reproduced.
//
// Genesis Microchip Corp., 2150 Gold Street
// Alviso, CA 95002 USA
// Genesis Microchip Inc., 165 Commerce Valley Dr. West
// Thornhill, Ontario, Canada, L3T 7V8
//
//================================================================
//
// MODULE: flavors.c
//
// USAGE : This file contains wrappers for GSEL functions for the
// case where we do not want to use the default flavor in
// the application.
//
//******************************************************************
#include "..\inc\all.h"
// feature tracking flavor of auto adjust
//gmt_RET_STAT gm_AutoGeometry_FT_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_FT_S(B_AutoAdjMode);
//}
// plain instant auto flavor of auto adjust
//gmt_RET_STAT gm_AutoGeometry_IA3_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3_S(B_AutoAdjMode);
//}
// instant auto with stealth flavor of auto adjust
// THIS IS THE DEFAULT - do not un-comment.
//gmt_RET_STAT gm_AutoGeometry_IA3S_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3S_S(B_AutoAdjMode);
//}
// non-stealth instant auto with phase skew flavor of auto adjust
//gmt_RET_STAT gm_AutoGeometry_IA3K_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3K_S(B_AutoAdjMode);
//}
// stealth instant auto with phase skew flavor of auto adjust
//gmt_RET_STAT gm_AutoGeometry_IA3SK_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3SK_S(B_AutoAdjMode);
//}
// non-stealth instant auto with phase skew & auto filter flavor of auto adjust
//gmt_RET_STAT gm_AutoGeometry_IA3KF_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3KF_S(B_AutoAdjMode);
//}
// stealth instant auto with phase skew & auto filter flavor of auto adjust
// The works !!!
//gmt_RET_STAT gm_AutoGeometry_IA3SKF_S(BYTE B_AutoAdjMode);
//gmt_RET_STAT gm_AutoGeometry_S(BYTE B_AutoAdjMode)
//{
// return gm_AutoGeometry_IA3SKF_S(B_AutoAdjMode);
//}
// To use both hardware i2c and software i2c, define USE_SW_I2C below.
// gm_I2cInit will initialize the hardware i2c port, to access the hardware
// port use gm_Read/WriteI2cBlock functions passing in the same B_Port used
// to initialize the hardware port (it doesn't matter what number you assign
// to B_Port, it only identifies it as the hardware port). To then use the
// software port, initialize it using gm_I2cInitSW (see gsel.h). There is no
// B_Port assigned to software port, to use the software port, use the same
// gm_Read/WriteI2cBlock functions, but use any value for B_Port that you didn't
// assign to the hardware port. For example, first initialize the hw port
// assigning B_Port to '0', then initialize the sw port. To use the hw port
// call gm_Read/WriteI2cBlock functions with B_Port = '0', to access the
// sw port, use gm_Read/WriteI2cBlock functions
// with B_Port = '1' (or any number other than '0')
#if USE_SW_I2C
extern gmt_RET_STAT gm_I2cInit_sw( BYTE B_Port, DWORD D_CpuClkFreq, WORD W_SckFreq );
extern gmt_RET_STAT gm_ReadI2cBlock_sw( BYTE B_Port, BYTE B_DevAddress,
BYTE *Bp_Buffer, BYTE B_Length, gmt_RET_STAT B_Stop );
extern gmt_RET_STAT gm_WriteI2cBlock_sw( BYTE B_Port, BYTE B_DevAddress,
BYTE *Bp_Buffer, BYTE B_Length, gmt_RET_STAT B_Stop );
gmt_RET_STAT gm_I2cInit( BYTE B_Port, DWORD D_CpuClkFreq, WORD W_SckFreq )
{
return gm_I2cInit_sw(B_Port,D_CpuClkFreq,W_SckFreq);
}
gmt_RET_STAT gm_WriteI2cBlock( BYTE B_Port, BYTE B_DevAddress, BYTE *Bp_Buffer,
BYTE B_Length, gmt_RET_STAT B_Stop )
{
return gm_WriteI2cBlock_sw(B_Port, B_DevAddress, Bp_Buffer, B_Length, B_Stop);
}
gmt_RET_STAT gm_ReadI2cBlock( BYTE B_Port, BYTE B_DevAddress,
BYTE *Bp_Buffer, BYTE B_Length, gmt_RET_STAT B_Stop )
{
return gm_ReadI2cBlock_sw(B_Port, B_DevAddress, Bp_Buffer, B_Length, B_Stop);
}
#endif // USE_SW_I2C
// a new version of Gprobe will support print over ddc2bi
// to use this #define USE_DDC2BiPrint 1
#if USE_DDC2BiPrint
void gm_Print_ddc(const char far *Bp_Str, WORD W_Value);
gmt_MsgStruct * gm_CommsGetMessage_ddc2biprint(BYTE B_WhichCommHandler);
void gmi_SystemInit_ddcPrint(void);
void gm_Print(const char far *Bp_Str, WORD W_Value)
{
gm_Print_ddc (Bp_Str, W_Value);
}
gmt_MsgStruct * gm_CommsGetMessage(BYTE B_WhichCommHandler)
{
return gm_CommsGetMessage_ddc2biprint (B_WhichCommHandler);
}
void gm_SystemInit (void)
{
gmi_SystemInit_ddcPrint();
}
#endif
//******************************************************************
// This section controls Pixel Cruncher Options.
//******************************************************************
#ifdef USE_PIXCR_AUTOPOSITION
gmt_RET_STAT gm_AutoPosition_pxS(void);
gmt_RET_STAT gm_AutoPosition_S(void)
{
return gm_AutoPosition_pxS();
}
gmt_RET_STAT gmp_AutoPositionNoIBD_pxS(void);
gmt_RET_STAT gmp_AutoPositionNoIBD_S(void)
{
return gmp_AutoPositionNoIBD_pxS();
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -