play_capture_msp34x5.c

来自「1. 8623L平台」· C语言 代码 · 共 135 行

C
135
字号
/* * * Copyright (c) 2001-2007 Sigma Designs, Inc.  * All Rights Reserved. Proprietary and Confidential. * *//**	@file   play_capture_MSP34x5.c	@brief  device specific functions for play_capture_main application		@author Christian Wolff Sean.Sekwon.Choi*/// to enable or disable the debug messages of this source file, put 1 or 0 below#if 0#define LOCALDBG ENABLE#else#define LOCALDBG DISABLE#endif#include "sample_os.h"#define ALLOW_OS_CODE 1#include "../rua/include/rua.h"#include "../rua/include/rua_property.h"#include "../dcc/include/dcc.h"#include "../rmcore/include/rmstatustostring.h"#include "../rmlibcw/include/rmlibcw.h"#include "play_capture_MSP34x5.h"#include "play_capture_i2c.h"struct capsam_MSP34x5_instance {	struct RUA *pRUA;	RMuint32 I2CModuleID;	struct EMhwlibI2CDeviceParameter I2CDevice;	RMuint8 BaseDevice;};RMstatus capsam_MSP34x5_open(struct RUA *pRUA, 			  struct capsam_MSP34x5_instance **ppMSP34x5, 			  struct capsam_access *pInput){	RMstatus err = RM_OK;	// Micronas MSP 34x5 setup	struct capsam_MSP34x5_instance *pMSP34x5;		RMDBGLOG((FUNCNAME, "%s\n",__func__));	// Sanity checks	if (ppMSP34x5 == NULL) return RM_FATALINVALIDPOINTER;	*ppMSP34x5 = NULL;	if (pRUA == NULL) return RM_FATALINVALIDPOINTER;	if (pInput == NULL) return RM_FATALINVALIDPOINTER;		// Allocate and clear local instance	pMSP34x5 = (struct capsam_MSP34x5_instance *)RMMalloc(sizeof(struct capsam_MSP34x5_instance));	if (pMSP34x5 == NULL) {		fprintf(stderr, "FATAL! Not enough memory for struct capsam_MSP34x5_instance!\n");		return RM_FATALOUTOFMEMORY;	}	RMMemset(pMSP34x5, 0, sizeof(struct capsam_MSP34x5_instance));	*ppMSP34x5 = pMSP34x5;		// Set default and startup values	pMSP34x5->pRUA = pRUA;	pMSP34x5->I2CModuleID = pInput->I2CModuleID;	pMSP34x5->I2CDevice = pInput->I2CDevice;	pMSP34x5->BaseDevice = pInput->I2CDevice.DevAddr;		return err;}RMstatus capsam_MSP34x5_close(struct capsam_MSP34x5_instance *pMSP34x5){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	// Sanity checks	if (pMSP34x5 == NULL) return RM_FATALINVALIDPOINTER;		// Free all ressources	RMFree(pMSP34x5);	return RM_OK;}RMstatus capsam_MSP34x5_tristate(struct capsam_MSP34x5_instance *pMSP34x5){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_init_capture(struct capsam_MSP34x5_instance *pMSP34x5,				  const struct capsam_access *pInput){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_setup_output(struct capsam_MSP34x5_instance *pMSP34x5, 				  struct capsam_update *pUpdate){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_setup_audio(struct capsam_MSP34x5_instance *pMSP34x5, 				 struct capsam_update *pUpdate){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_setup_vbi(struct capsam_MSP34x5_instance *pMSP34x5, 			       struct capsam_update *pUpdate){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_check_int(struct capsam_MSP34x5_instance *pMSP34x5){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}RMstatus capsam_MSP34x5_handle_int(struct capsam_MSP34x5_instance *pMSP34x5, 				struct capsam_update *pUpdate){	RMDBGLOG((FUNCNAME, "%s\n",__func__));	return RM_OK;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?