📄 at91rm9200_ssc.h
字号:
/* linux/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h
*
* Hardware definition for the ssc peripheral in the ATMEL at91rm9200 processor
*
* Generated 01/09/2006 (16:49:36) AT91 SW Application Group from SSC_1762A V1.2
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __AT91RM9200_SSC_H
#define __AT91RM9200_SSC_H
/* -------------------------------------------------------- */
/* SSC ID definitions for AT91RM9200 */
/* -------------------------------------------------------- */
#ifndef AT91C_ID_SSC0
#define AT91C_ID_SSC0 14 /**< Serial Synchronous Controller 0 id */
#endif /* AT91C_ID_SSC0 */
#ifndef AT91C_ID_SSC1
#define AT91C_ID_SSC1 15 /**< Serial Synchronous Controller 1 id */
#endif /* AT91C_ID_SSC1 */
#ifndef AT91C_ID_SSC2
#define AT91C_ID_SSC2 16 /**< Serial Synchronous Controller 2 id */
#endif /* AT91C_ID_SSC2 */
/* -------------------------------------------------------- */
/* SSC Base Address definitions for AT91RM9200 */
/* -------------------------------------------------------- */
#define AT91C_BASE_SSC2 0xFFFD8000 /**< SSC2 base address */
#define AT91C_BASE_SSC1 0xFFFD4000 /**< SSC1 base address */
#define AT91C_BASE_SSC0 0xFFFD0000 /**< SSC0 base address */
/* -------------------------------------------------------- */
/* PIO definition for SSC hardware peripheral */
/* -------------------------------------------------------- */
#define AT91C_PB9_RD1 (1 << 9) /**< SSC Receive Data 1 */
#define AT91C_PB11_RF1 (1 << 11) /**< SSC Receive Frame Sync 1 */
#define AT91C_PB10_RK1 (1 << 10) /**< SSC Receive Clock 1 */
#define AT91C_PB8_TD1 (1 << 8) /**< SSC Transmit Data 1 */
#define AT91C_PB15_RD2 (1 << 15) /**< SSC Receive Data 2 */
#define AT91C_PB17_RF2 (1 << 17) /**< SSC Receive Frame Sync 2 */
#define AT91C_PB16_RK2 (1 << 16) /**< SSC Receive Clock 2 */
#define AT91C_PB14_TD2 (1 << 14) /**< SSC Transmit Data 2 */
#define AT91C_PB12_TF2 (1 << 12) /**< SSC Transmit Frame Sync 2 */
#define AT91C_PB13_TK2 (1 << 13) /**< SSC Transmit Clock 2 */
/* -------------------------------------------------------- */
/* Register offset definition for SSC hardware peripheral */
/* -------------------------------------------------------- */
#define SSC_CR (0x0000) /**< Control Register */
#define SSC_CMR (0x0004) /**< Clock Mode Register */
#define SSC_RCMR (0x0010) /**< Receive Clock ModeRegister */
#define SSC_RFMR (0x0014) /**< Receive Frame Mode Register */
#define SSC_TCMR (0x0018) /**< Transmit Clock Mode Register */
#define SSC_TFMR (0x001C) /**< Transmit Frame Mode Register */
#define SSC_RHR (0x0020) /**< Receive Holding Register */
#define SSC_THR (0x0024) /**< Transmit Holding Register */
#define SSC_RSHR (0x0030) /**< Receive Sync Holding Register */
#define SSC_TSHR (0x0034) /**< Transmit Sync Holding Register */
#define SSC_RC0R (0x0038) /**< Receive Compare 0 Register */
#define SSC_RC1R (0x003C) /**< Receive Compare 1 Register */
#define SSC_SR (0x0040) /**< Status Register */
#define SSC_IER (0x0044) /**< Interrupt Enable Register */
#define SSC_IDR (0x0048) /**< Interrupt Disable Register */
#define SSC_IMR (0x004C) /**< Interrupt Mask Register */
#define SSC_RPR (0x0100) /**< Receive Pointer Register */
#define SSC_RCR (0x0104) /**< Receive Counter Register */
#define SSC_TPR (0x0108) /**< Transmit Pointer Register */
#define SSC_TCR (0x010C) /**< Transmit Counter Register */
#define SSC_RNPR (0x0110) /**< Receive Next Pointer Register */
#define SSC_RNCR (0x0114) /**< Receive Next Counter Register */
#define SSC_TNPR (0x0118) /**< Transmit Next Pointer Register */
#define SSC_TNCR (0x011C) /**< Transmit Next Counter Register */
#define SSC_PTCR (0x0120) /**< PDC Transfer Control Register */
#define SSC_PTSR (0x0124) /**< PDC Transfer Status Register */
/* -------------------------------------------------------- */
/* Bitfields definition for SSC hardware peripheral */
/* -------------------------------------------------------- */
/* --- Register SSC_CR */
#define AT91C_SSC_RXEN (0x1 << 0 ) /**< (SSC) Receive Enable */
#define AT91C_SSC_RXDIS (0x1 << 1 ) /**< (SSC) Receive Disable */
#define AT91C_SSC_TXEN (0x1 << 8 ) /**< (SSC) Transmit Enable */
#define AT91C_SSC_TXDIS (0x1 << 9 ) /**< (SSC) Transmit Disable */
#define AT91C_SSC_SWRST (0x1 << 15) /**< (SSC) Software Reset */
/* --- Register SSC_RCMR */
#define AT91C_SSC_CKS (0x3 << 0 ) /**< (SSC) Receive/Transmit Clock Selection */
#define AT91C_SSC_CKS_DIV 0x0 /**< (SSC) Divided Clock */
#define AT91C_SSC_CKS_TK 0x1 /**< (SSC) TK Clock signal */
#define AT91C_SSC_CKS_RK 0x2 /**< (SSC) RK pin */
#define AT91C_SSC_CKO (0x7 << 2 ) /**< (SSC) Receive/Transmit Clock Output Mode Selection */
#define AT91C_SSC_CKO_NONE (0x0 << 2) /**< (SSC) Receive/Transmit Clock Output Mode: None RK pin: Input-only */
#define AT91C_SSC_CKO_CONTINOUS (0x1 << 2) /**< (SSC) Continuous Receive/Transmit Clock RK pin: Output */
#define AT91C_SSC_CKO_DATA_TX (0x2 << 2) /**< (SSC) Receive/Transmit Clock only during data transfers RK pin: Output */
#define AT91C_SSC_CKI (0x1 << 5 ) /**< (SSC) Receive/Transmit Clock Inversion */
#define AT91C_SSC_CKG (0x3 << 6 ) /**< (SSC) Receive/Transmit Clock Gating Selection */
#define AT91C_SSC_CKG_NONE (0x0 << 6) /**< (SSC) Receive/Transmit Clock Gating: None, continuous clock */
#define AT91C_SSC_CKG_LOW (0x1 << 6) /**< (SSC) Receive/Transmit Clock enabled only if RF Low */
#define AT91C_SSC_CKG_HIGH (0x2 << 6) /**< (SSC) Receive/Transmit Clock enabled only if RF High */
#define AT91C_SSC_START (0xF << 8 ) /**< (SSC) Receive/Transmit Start Selection */
#define AT91C_SSC_START_CONTINOUS (0x0 << 8) /**< (SSC) Continuous, as soon as the receiver is enabled, and immediately after the end of transfer of the previous data. */
#define AT91C_SSC_START_TX (0x1 << 8) /**< (SSC) Transmit/Receive start */
#define AT91C_SSC_START_LOW_RF (0x2 << 8) /**< (SSC) Detection of a low level on RF input */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -