📄 msapi_global.c
字号:
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2007 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (¨MStar Confidential Information〃) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
/// @file msAPI_Global.h
/// @brief API for UART, Panel and DDC2BI control
/// @author MStar Semiconductor, Inc.
//
////////////////////////////////////////////////////////////////////////////////
#define MSAPI_GLOBAL_C
/******************************************************************************/
/* Header Files */
/* ****************************************************************************/
#include "board.h"
#include "drvglobal.h"
#include "msGPIO.h"
#include "Drvtimer.h"
#include "msAPI_Global.h"
#include "drvuart.h"
#include "drvddc2bi.h"
#include "drvGPIO.h"
#include "Drvpower.h"// kevin 20070829 tempoary
/********************************************************************************/
/* Local */
/* ******************************************************************************/
/********************************************************************************/
/* Local Function Prototypes */
/********************************************************************************/
extern void MDrv_Scaler_SetPanelOnOff(BOOLEAN bPanelOn);
/********************************************************************************/
/* Functions */
/********************************************************************************/
//*************************************************************************
//Function name: msAPI_XXX_functionname
//Passing parameter: none
//Return parameter: U8: Initialization status
//Description:
//*************************************************************************
/*U8 msAPI_XXX_functionname ( void )
{
}*/
#if(PANEL_TYPE_SEL != PNL_DAC_CRT)
/******************************************************************************/
///-This function will turn on the panel power
/******************************************************************************/
void msAPI_PowerResume()// kevin 20070829 tempoary
{
MDrv_PowerResume();
}
/******************************************************************************/
///-This function will turn on the panel power
/******************************************************************************/
void msAPI_Panel_PowerOn()
{
//MDrv_Panel_PowerOn();
MDrv_Scaler_SetPanelOnOff(TRUE);
}
/******************************************************************************/
///-This function will turn off the panel power
/******************************************************************************/
void msAPI_Panel_PowerOff()
{
//MDrv_Panel_PowerOff();
MDrv_Scaler_SetPanelOnOff(FALSE);
}
#endif // #if(PANEL_TYPE_SEL != PNL_DAC_CRT)
void msAPI_Peripheral_Device_Reset(void)
{
Peripheral_Device_Reset_ON(); //dummy function
MDrv_Timer_Delayms(20);
Peripheral_Device_Reset_OFF(); //dummy function
MDrv_Timer_Delayms(5);
}
#if ENABLE_DDCCI
void msAPI_SI2C_Init(void)
{
#if 0
MDrv_DDC2BI_Init();
#else
MDrv_DDC2BI_FF_Init();
#endif
}
void msAPI_DDC2BI_Init(void)
{
MDrv_DDC2BI_Init();
}
void msAPI_DDC2BI_CommandHandler(void)
{
// MDrv_DDC2BI_CommandHandler();
}
#endif
#if (ENABLE_MSTV_UART_DEBUG)
/******************************************************************************/
///-This function will enable the debug mode and return the status
///@return
///TRUE:DEBUG MODE
///FLASE: NORMAL MODE
/******************************************************************************/
void msAPI_UART_PrintUartCommand(void)
{
BYTE i;
printf("\r\nUartCommand:",1);
for(i=0; i< _UART_CMD_LENGTH_; i++)
{
printf("[%2bx]",(g_UartCommand.Buffer[i]));
}
}
U8 msAPI_UART_DecodeCommand( void )
{
if (g_bUart0Detected) // cehck command flag
{
if (UART_EXT)
MDrv_UART_DecodeExtCommand();
else
MDrv_UART_DecodeNormalCommand();
g_bUart0Detected = FALSE;
}
// stop main loop for debug
if( g_bDebugProgStopFlag )
return 1;
else
return 0;
}
#endif
#undef MSAPI_GLOBAL_C
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -