pcm1742.h

来自「SAMSUNG 5009的源代码」· C头文件 代码 · 共 73 行

H
73 行
字号
/******************************************************************************
 * Filename    : PCM1742.h
 * Start date  : 2003.09.15
 * By          : Chongkun Lee
 * Contact     : bach1004@samsung.com
 * Description : low level api headers.
 * $Log:$
 ******************************************************************************
 */
#ifndef	_PCM1742_H_
#define	_PCM1742_H_

#ifdef __cplusplus
extern "C" {
#endif

#if _USE_5010

//===================================================
#define PCM1742_Enable()	rPDAT0 &= ~0x20
#define PCM1742_Disable()	rPDAT0 |= 0x20
#define PCM1742_ClkLow()	rPDAT0 &= ~0x40
#define PCM1742_ClkHigh()	rPDAT0 |= 0x40
#define PCM1742_DataLow()	rPDAT0 &= ~0x80 
#define PCM1742_DataHigh()	rPDAT0 |= 0x80
#define PCM1742_DataReset()	rPDAT0 |= 0xe0

#else
	
#ifdef _BOARD_EVA
/******************************************************
 *       DEFINES
 *		ML:1.0, MC:1.6, MD:1.4, HWMUTE:-
 *****************************************************/
#define PCM1742_Enable()	rPDAT1 &= ~0x01
#define PCM1742_Disable()	rPDAT1 |= 0x01
#define PCM1742_ClkLow()	rPDAT1 &= ~0x40
#define PCM1742_ClkHigh()	rPDAT1 |= 0x40
#define PCM1742_DataLow()	rPDAT1 &= ~0x10 
#define PCM1742_DataHigh()	rPDAT1 |= 0x10
#define PCM1742_DataReset()	rPDAT1 |= 0x51
#else
/******************************************************
 *       DEFINES
 *		ML:0.4, MC:4.1, MD:4.0, HWMUTE:2.2
 *		ML:0.5, MC:0.6, MD:0.7, HWMUTE:2.2
 *****************************************************/
#define PCM1742_Enable()	rPDAT0 &= ~0x20
#define PCM1742_Disable()	rPDAT0 |= 0x20
#define PCM1742_ClkLow()	rPDAT0 &= ~0x40
#define PCM1742_ClkHigh()	rPDAT0 |= 0x40
#define PCM1742_DataLow()	rPDAT0 &= ~0x80 
#define PCM1742_DataHigh()	rPDAT0 |= 0x80
#define PCM1742_DataReset()	rPDAT0 |= 0xe0
#endif

#endif


#define PCM1742_HWMUTE_ON()	//rPDAT2 |= 0x4;
#define PCM1742_HWMUTE_OFF()	//rPDAT2 &= ~0x4;

/******************************************************
 *       FUNCTIONS
 *****************************************************/
VOID PCM1742_Control(UCHAR idx,UCHAR data);

#ifdef __cplusplus
}
#endif

#endif /*_PCM1742_H_*/

⌨️ 快捷键说明

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