📄 msp34x5.c
字号:
/* * * Copyright (c) 2001-2007 Sigma Designs, Inc. * All Rights Reserved. Proprietary and Confidential. * *//** @file MSP34x5.c @brief device specific functions for 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 "common.h"#include "MSP34x5.h"#include "i2c.h"struct cap_MSP34x5_instance { struct RUA *pRUA; RMuint32 I2CModuleID; struct EMhwlibI2CDeviceParameter I2CDevice; RMuint8 BaseDevice;};RMstatus cap_MSP34x5_open(struct RUA *pRUA, struct cap_MSP34x5_instance **ppMSP34x5, RMuint32 I2CModuleID, struct EMhwlibI2CDeviceParameter *pI2CDevice){ RMstatus err = RM_OK; // Micronas MSP 34x5 setup struct cap_MSP34x5_instance *pMSP34x5; RMDBGLOG((FUNCNAME, "%s\n",__func__)); // Sanity checks if (ppMSP34x5 == NULL) return RM_FATALINVALIDPOINTER; *ppMSP34x5 = NULL; if (pRUA == NULL) return RM_FATALINVALIDPOINTER; // Allocate and clear local instance pMSP34x5 = (struct cap_MSP34x5_instance *)RMMalloc(sizeof(struct cap_MSP34x5_instance)); if (pMSP34x5 == NULL) { RMDBGLOG((ENABLE, "FATAL! Not enough memory for struct cap_MSP34x5_instance!\n")); return RM_FATALOUTOFMEMORY; } RMMemset(pMSP34x5, 0, sizeof(struct cap_MSP34x5_instance)); *ppMSP34x5 = pMSP34x5; // Set default and startup values pMSP34x5->pRUA = pRUA; pMSP34x5->I2CModuleID = I2CModuleID; pMSP34x5->I2CDevice = *pI2CDevice; pMSP34x5->BaseDevice = pI2CDevice->DevAddr; return err;}RMstatus cap_MSP34x5_close(struct cap_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 cap_MSP34x5_tristate(struct cap_MSP34x5_instance *pMSP34x5){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_init_capture(struct cap_MSP34x5_instance *pMSP34x5, enum cap_board board, enum cap_audio_input audio_input, RMuint32 audio_input_num ){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_setup_output(struct cap_MSP34x5_instance *pMSP34x5, struct cap_update *pUpdate){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_setup_audio(struct cap_MSP34x5_instance *pMSP34x5, struct cap_update *pUpdate){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_setup_vbi(struct cap_MSP34x5_instance *pMSP34x5, struct cap_update *pUpdate){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_check_int(struct cap_MSP34x5_instance *pMSP34x5){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}RMstatus cap_MSP34x5_handle_int(struct cap_MSP34x5_instance *pMSP34x5, struct cap_update *pUpdate){ RMDBGLOG((FUNCNAME, "%s\n",__func__)); return RM_OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -