📄 pxa-ssp.h
字号:
/*
File name: pxa-ssp.h
Description: This file defines some bit operation for SSP inerface
- We implemented it based on the Monta_Vista generic.c
*/
#ifndef _PXA_SSP_H
#define _PXA_SSP_H
#if __cplusplus
extern "C"
{
#endif
#include <bulverde_ssp.h>
///Clock Definition
#define CKEN23_SSP1 (1<<23) /* SSP1 Unit Clock Enable */
#define CKEN4_SSP3 (1<<4) /* SSP3 Unit Clock Enable */
#define CKEN3_SSP (1<<3) /* SSP Unit Clock Enable */
#define CKEN3_SSP2 (1<<3) /* SSP2 Unit Clock Enable */
///Bit definition for SSP controller register 0
#define SSCR0_SSE (1 << 7)
#define SSCR0_DSS(x) (x)
#define SSCR0_FRF(x) ((x) << 4)
#define SSCR0_SCR(x) ((x) << 8)
///Bit definition for SSP controller register 1
#define SSCR1_TTELP (1 << 31)
#define SSCR1_TTE (1 << 30)
#define SSCR1_SCFR (1 << 28)
#define SSCR1_RWOT (1 << 23)
#define SSCR1_TRAIL (1 << 22)
#define SSCR1_TSRE (1 << 21)
#define SSCR1_RSRE (1 << 20)
#define SSCR1_STRF (1 << 15)
#define SSCR1_EFWR (1 << 14)
#define SSCR1_RFT(x) ((x) << 10)
#define SSCR1_TFT(x) ((x) << 6)
#define SSCR1_SPO (1 << 3)
#define SSCR1_LBM (1 << 2)
///Bit definition for SSPSP
#define SSPSP_SCMODE(x) ((x) << 0)
#define SSPSP_SFRMP (1 << 2)
#define SSPSP_ETDS (1 << 1)
#define SSPSP_STRTDLY(x) ((x) << 4)
#define SSPSP_DMYSTRT(x) ((x) << 7)
#define SSPSP_SFRMDLY(x) ((x) << 9)
#define SSPSP_SFRMWDTH(x) ((x) << 16)
#define SSPSP_DMYSTOP(x) ((x) << 23)
#define SSPSP_FRST (1 << 25)
///
///The definition of SSP register map is insufficient.
///We added the registers which don't exist in the BSP
///
typedef struct _ssp_ext
{
BULVERDE_SSP_REG base;
UINT32 reserved[5]; ///0x????_0014 ~ 0x????_0x0024
UINT32 ssto; ///Time-out register
UINT32 sspsp; ///SSP Programmable Serial Protocol
UINT32 sstsa; ///SSP Tx Timeslot Active register
UINT32 ssrsa; ///SSP Rx Timeslot Active register
UINT32 sstss; ///SSP Timeslot Status register
UINT32 ssacd; ///SSP Audio Clock Divider registere
} BULVERDE_SSP_EXT_REG, *PBULVERDE_SSP_EXT_REG;
#if __cplusplus
}
#endif ///__cplusplus
#endif ///_PXA_SSP_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -