📄 play_capture_ad9883.c
字号:
/* * * Copyright (c) 2001-2007 Sigma Designs, Inc. * All Rights Reserved. Proprietary and Confidential. * *//** @file play_capture_AD9883.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_AD9883.h"#include "play_capture_i2c.h"RMstatus init_capture_AD9883( struct RUA *pInstance, struct capture_cmdline *capture_opt, // struct local_cmdline *local_opt, struct audio_cmdline *audio_opt, RMuint8 dev, RMuint8 delay){ return RM_OK;}RMstatus tristate_AD9883(struct RUA *pInstance, RMuint8 delay, RMuint8 dev){ struct instAD9883 { struct RUA *pRUA; RMuint32 I2CModuleID; // emhwlib Module ID of the I2C bus access struct EMhwlibI2CDeviceParameter I2CDevice; RMuint8 BaseDevice; // base device address of the device } inst; inst.pRUA = pInstance; inst.I2CModuleID = EMHWLIB_MODULE(I2C, 1); inst.I2CDevice.APIVersion = 1; inst.I2CDevice.Clock = GPIOId_Sys_0; inst.I2CDevice.Data = GPIOId_Sys_1; inst.I2CDevice.DevAddr = dev; inst.I2CDevice.Delay = delay; inst.I2CDevice.Speed = 100; inst.BaseDevice = dev; capsam_i2c_write(&inst, 0x0F, 0x4C); // power down AD9883A return RM_OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -