📄 wm8746.h
字号:
/******************************************************************************
* Filename : WM8746.h
* Start date : 2003.09.15
* By : Chongkun Lee
* Contact : bach1004@samsung.com
* Description : low level api headers.
* $Log:$
******************************************************************************
*/
#ifndef _WM8746_H_
#define _WM8746_H_
#ifdef __cplusplus
extern "C" {
#endif
#if _USE_5008
/******************************************************
* ML : GPIO 2.3
* MC : GPIO 2.4
* MD : GPIO 0.5
*****************************************************/
/*
there is no port in S5L5008 china board.
*/
#define WM8746_Enable() //rPDAT2 &= ~0x08
#define WM8746_Disable() //rPDAT2 |= 0x08
#define WM8746_ClkLow() //rPDAT2 &= ~0x10
#define WM8746_ClkHigh() //rPDAT2 |= 0x10
#define WM8746_DataLow() //rPDAT0 &= ~0x20
#define WM8746_DataHigh() //rPDAT0 |= 0x20
#define WM8746_DataReset() //{
//rPDAT0 |= 0x20;
//rPDAT2 |= 0x18;
//}
#else
/******************************************************
* ML : GPIO 0.7//
* MC : GPIO 4.1//1.3
* MD : GPIO 4.0//0.5
*****************************************************/
#if 1
#define WM8746_Enable() rPDAT0 &= ~0x80
#define WM8746_Disable() rPDAT0 |= 0x80
#define WM8746_ClkLow() rPDAT1 &= ~0x08
#define WM8746_ClkHigh() rPDAT1 |= 0x08
#define WM8746_DataLow() rPDAT0 &= ~0x20
#define WM8746_DataHigh() rPDAT0 |= 0x20
#define WM8746_DataReset() { \
rPDAT0 |= 0xa0; \
rPDAT1 |= 0x08; \
}
#else
#define WM8746_Enable() rPDAT0 |= 0x80
#define WM8746_Disable() rPDAT0 &= ~0x80
#define WM8746_ClkLow() rPDAT4 &= ~0x2
#define WM8746_ClkHigh() rPDAT4 |= 0x2
#define WM8746_DataLow() rPDAT4 &= ~0x1
#define WM8746_DataHigh() rPDAT4 |= 0x1
#define WM8746_DataReset() { \
/*rPDAT0 &= ~0x80;*/ \
rPDAT4 |= 0x3; \
}
#endif
#endif
/******************************************************
* FUNCTIONS
*****************************************************/
VOID WM8746_Control(UCHAR idx,USHORT data);
#ifdef __cplusplus
}
#endif
#endif /*_PCM1742_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -