📄 wmplatformconfig.h
字号:
# define RESET_GPIO_MASK GPIO_5
# define RESET_GPIO_REG(_REG) GPIO_REG_0_31(_REG)
# define RESET_GPIO_ALTFN 0
# define RESET_GPIO_ALTFN_MASK GPIO_AF3(RESET_GPIO_NUM)
# define RESET_GPIO_ALTFN_REG GPIO_ALTFN_REG_0_15
#endif
/*
* The MCLK setting - 13MHz.
*/
#ifndef WM_MCLK_FREQUENCY
/* # define WM_MCLK_FREQUENCY 13000000 * 13MHz */
# define WM_MCLK_FREQUENCY 12288000 /* corresponds to 48kHz */
#endif
/*
* The default interface settings for HiFi in I2S.
* Note: this doesn't affect AC'97.
*
* WM_AUDIOIF_DEFAULT_HIFI_IS_MASTER - TRUE for the codec to master the I2S,
* FALSE for the codec to be slave.
* WM_AUDIOIF_DEFAULT_HIFI_FORMAT - one of the WM_AUDIOIF_FORMAT constants.
* WM_AUDIOIF_DEFAULT_HIFI_WIDTH - one of the WM_AUDIOIF_WIDTH constants.
* WM_AUDIOIF_DEFAULT_HIFI_FLAGS - one or more of the WM_AUDIOIF_FLAGS constants.
*/
#define WM_AUDIOIF_DEFAULT_HIFI_IS_MASTER FALSE
#define WM_AUDIOIF_DEFAULT_HIFI_FORMAT WM_AUDIOIF_I2S
#define WM_AUDIOIF_DEFAULT_HIFI_WIDTH WM_AUDIOIF_16BIT
#define WM_AUDIOIF_DEFAULT_HIFI_FLAGS WM_AUDIOIF_FLAGS_NONE
/*
* The default interface settings for Voice.
*
* WM_AUDIOIF_DEFAULT_VOICE_IS_MASTER - TRUE for the codec to master the SSP,
* FALSE for the codec to be slave.
* WM_AUDIOIF_DEFAULT_VOICE_FORMAT - one of the WM_AUDIOIF_FORMAT constants.
* WM_AUDIOIF_DEFAULT_VOICE_WIDTH - one of the WM_AUDIOIF_WIDTH constants.
* WM_AUDIOIF_DEFAULT_VOICE_FLAGS - one or more of the WM_AUDIOIF_FLAGS constants.
*/
#define WM_AUDIOIF_DEFAULT_VOICE_IS_MASTER TRUE
#define WM_AUDIOIF_DEFAULT_VOICE_FORMAT WM_AUDIOIF_DSP_MODE_A
#define WM_AUDIOIF_DEFAULT_VOICE_WIDTH WM_AUDIOIF_16BIT
#define WM_AUDIOIF_DEFAULT_VOICE_FLAGS WM_AUDIOIF_MONO
/*
* Touch screen pen down GPIO configuration.
*/
/*
* Define PEN_DETECT_GPIO_NUM to the GPIO number you are using.
* Define PEN_DETECT_GPIO_MASK to the bitmask of the GPIO you are using.
* Define PEN_DETECT_GPIO_REG(_REG) one of the following:
* GPIO_REG_0_31(_REG) for GPIOs 0 - 31
* GPIO_REG_32_63(_REG) for GPIOs 32 - 63
* GPIO_REG_64_95(_REG) for GPIOs 64 - 95
* GPIO_REG_96_127(_REG) for GPIOs 96 - 127
*/
/*
* Lubbock pen detect configuration.
*/
#if WM_BOARD_LUBBOCK
# if defined ( PALM_DBPXA250 )
# define PEN_DETECT_GPIO_NUM 7
# define PEN_DETECT_GPIO_MASK GPIO_7
# define PEN_DETECT_GPIO_REG(_REG) GPIO_REG_0_31(_REG)
# else
# define PEN_DETECT_GPIO_NUM 4
# define PEN_DETECT_GPIO_MASK GPIO_4
# define PEN_DETECT_GPIO_REG(_REG) GPIO_REG_0_31(_REG)
# endif
#endif
/*
* MainstoneII pen detect configuration.
* NOTE: By default we set up the pen down GPIO to use
* one of the FPGA IRQs on the MainstoneII. If
* you wish to use a GPIO on the PXA27X processor
* instead, define WM_MAINSTONEII_FPGA_PEN_DETECT
* as FALSE and configure the pen detect GPIO to
* the GPIO that you wish to use.
*/
#if WM_BOARD_MAINSTONEII
# define WM_MAINSTONEII_FPGA_PEN_DETECT TRUE
# if WM_MAINSTONEII_FPGA_PEN_DETECT
/*
* On the Mainstone platform the Pendown signal can be routed to
* two different IRQ pins.
* If the WM Daughter Card is setup to route Pendown to the AC97
* Interrupt define AC97IRQ as TRUE.
* If the WM Daughter Card is setup to route Pendown to the PENIRQ
* Interrupt define PENIRQ as TRUE.
* Define the IRQ pin that you do not want to use as FALSE.
*/
# define AC97IRQ FALSE
# define PENIRQ TRUE
# if AC97IRQ
# define PEN_DETECT_GPIO_NUM 4
# else
# define PEN_DETECT_GPIO_NUM 5
# endif
# else /* WM_MAINSTONEII_FPGA_PEN_DETECT */
# define PEN_DETECT_GPIO_NUM 15
# define PEN_DETECT_GPIO_MASK GPIO_15
# define PEN_DETECT_GPIO_REG(_REG) GPIO_REG_0_31(_REG)
# endif /* WM_MAINSTONEII_FPGA_PEN_DETECT */
# endif /* WM_BOARD_MAINSTONEII */
/*
* Statically allocated DMA Channel IDs
*/
#define WMDMA_STEREO_OUT 0
#define WMDMA_STEREO_IN 1
#define WMDMA_MONO_OUT 2
#define WMDMA_VOICE_OUT 3
#define WMDMA_VOICE_IN 4
#define UNKNOWN_DMA_CHANNEL -1
/*
* We do not support I2S on the Lubbock platform at the moment.
*/
#if WM_BOARD_LUBBOCK
# undef WM_I2S
# define WM_I2S FALSE
# undef WM8731
# define WM8731 FALSE
# undef WM8753
# define WM8753 FALSE
#endif /* WM_BOARD_LUBBOCK */
/*
* We do not support Voice DAC on the Lubbock platform at the moment.
*/
#if WM_BOARD_LUBBOCK
# undef WM_VOICE
# define WM_VOICE FALSE
#endif /* WM_BOARD_LUBBOCK */
/*
* The Lubbock uses the WM9713 AMR card.
*/
#if WM_BOARD_LUBBOCK
# undef WM9713_AMR_CARD
# define WM9713_AMR_CARD TRUE
#endif /* WM_BOARD_LUBBOCK */
#if XLLP_AVAILABLE && XLLP_GPIO_AVAILABLE
/*
* There is code in Intel's XLLP layer to work with some Wolfson codecs.
* However, our platform-layer code also has code for dealing with the
* AC link.
*
* While we work closely with Intel to make sure both our code and theirs
* works, our code is more likely to have the latest changes to support
* the newest Wolfson codecs. Conversely, Intel's code is more likely
* to have the latest patches for the XScale controllers.
*
* To use the XLLP AC'97 code rather than the Wolfson AC'97 code, and hence
* save a small amount of code space, define the constant WM_USE_XLLP_AC97
* to TRUE.
*/
#define WM_USE_XLLP_AC97 FALSE
#else
/*
* XLLP isn't supported, or doesn't have everything we need,
* so don't try to use it.
*/
# define WM_USE_XLLP_AC97 FALSE
#endif /* XLLP_AVAILABLE */
/*
* To use the XLLP DMA code, which dynamically allocates a DMA channel,
* rather than the Wolfson code which statically allocates a DMA channel,
* define the constant WM_USE_DYNAMIC_DMA_CHANNEL as TRUE.
*
* NOTE : For WinCE audio drivers this is only compatible with WaveDev2
* and should be defined as FALSE if Wavedev is being used.
* NOTE : Dynamic DMA channel allocation is only supported on the BVDMAIN
* and INTEL_DBPXA27X BSPs.
*/
#if defined (WM_BSP_BVDMAIN) || defined (WM_BSP_INTEL_DBPXA27X)
# define WM_USE_DYNAMIC_DMA_CHANNEL TRUE
#else
# define WM_USE_DYNAMIC_DMA_CHANNEL FALSE
#endif
/*
* Amplifier definitions for Mainstone II.
* Note : The mainstoneII amplifiers are very noisy.
* You have a choice of a loud thud if you allow them to
* be turned on and off or listening to board noise when
* the codec is not in use.
* For a loud thud - define WM_MAINSTONEII_AMP_CONTROL as
* TRUE.
* For board noise - define WM_MAINSTONEII_AMP_CONTROL as
* FALSE.
* We prefer to live with the board noise so define
* WM_MAINSTONEII_AMP_CONTROL to FALSE by default.
*/
#define WM_MAINSTONEII_AMP_CONTROL FALSE
/*
* Function prototypes
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __WMPLATFORMCONFIG_H__ */
/*------------------------------ END OF FILE ---------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -