⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mx21_aipi.h

📁 MX21_InitCodeLib.rar freescale mx21系列ARM芯片9328的WINCE5.0下初始化代码
💻 H
字号:
/**********************************************************************
*
*         (C) COPYRIGHT 2004 FREESCALE, INC.
*         ALL RIGHTS RESERVED
*
*
*     Group/Division:  WMSG/MMDO
*
*     Description:
*
*     Related Specifications:
*
*     Errata:
*
*     File Name:        MX21_AIPI.h
*     Revision Number:  0.1
*     Author(s):        Sharad Kumar
*     Date created:     30Apr2004
*     Revision History:
*        Date      Rev     Description
*        ----      ---     -----------
*        30Apr04  0.1     First draft
*
**********************************************************************/

#ifndef _MX21_AIPI_H
#define _MX21_AIPI_H

#include "MX21_DataTypes.h"
#include "MX21_Common.h"
#include "MX21_MemMap.h"


/********************************************************************
R T C     F U N C T I O N S
*********************************************************************/

#define AIPI1_MAX_PERIPHERALS         24
#define AIPI2_MAX_PERIPHERALS         10


typedef enum {		
	IPBUS_PSIZE_8		= 0,
	IPBUS_PSIZE_16		= 1,
	IPBUS_PSIZE_32		= 2,
	IPBUS_UNOCCUPIED	= 3	
} aipi_per_size;



typedef enum { 
	
			    AIPI1_CONTROL   = 0,
			    AIPI1_DMA	    = 1,
			    AIPI1_WDOG		= 2,			
			    AIPI1_GPT1		= 3,
			    AIPI1_GPT2		= 4,
			    AIPI1_GPT3		= 5,
			    AIPI1_PWM		= 6,
			    AIPI1_RTC       = 7,
			    AIPI1_KPP		= 8,
			    AIPI1_OWIRE		= 9,
			    AIPI1_UART1		= 10,
			    AIPI1_UART2		= 11,
			    AIPI1_UART3		= 12,
			    AIPI1_UART4		= 13,
			    AIPI1_CSPI1		= 14,
			    AIPI1_CSPI2		= 15,
			    AIPI1_SSI1		= 16,
			    AIPI1_SSI2		= 17,
			    AIPI1_I2C		= 18,
			    AIPI1_SDHC1		= 19,
			    AIPI1_SDHC2		= 20,
			    AIPI1_GPIO		= 21,
			    AIPI1_AUDMUX    = 22,
			    AIPI1_CSPI3		= 23
			  } aipi1_peripherals;



typedef enum { 
			    AIPI2_CONTROL   = 0,
			    AIPI2_LCDC	    = 1,
			    AIPI2_SLCDC		= 2,			
			    AIPI2_RTIC		= 3,
			    AIPI2_USBOTG1   = 4,
			    AIPI2_USBOTG2	= 5,
			    AIPI2_EMMA		= 6,
			    AIPI2_CRM       = 7,
			    AIPI2_FIRI		= 8,
			    AIPI2_RNGA		= 9
			  } aipi2_peripherals;



typedef struct
{
  aipi1_peripherals  PerName;
  aipi_per_size      PerSize;
} AIPI1PerProperties;


typedef struct
{
  aipi2_peripherals  PerName;
  aipi_per_size      PerSize;
} AIPI2PerProperties;


/********************************************************************
A I P I     F U N C T I O N S
*********************************************************************/


//---------------------------------------------------
// write to the AIPI1 PAR register to select the 
// peripherals that can be accesed in user mode
//---------------------------------------------------

void
AIPI1_WritePAR(uint32_t data);        // 32 bit data value


//---------------------------------------------------
// write to the AIPI2 PAR register to select the 
// peripherals that can be accesed in user mode
//---------------------------------------------------

void
AIPI2_WritePAR(uint32_t data);       // 32 bit data value


//---------------------------------------------------
// configure the size of AIPI1 peripherals.  The argument
// to be passed specifies the peripheral name. Refer to the
// typedef declaration for aipi1_preipherals included
// in this header file.
//---------------------------------------------------

void
AIPI1_ConfigPeripheral(aipi1_peripherals); 


//---------------------------------------------------
// configure the size of AIPI2 peripherals.  The argument
// to be passed specifies the peripheral name. Refer to the
// typedef declaration for aipi1_preipherals included
// in this header file.
//---------------------------------------------------

void
AIPI2_ConfigPeripheral(aipi2_peripherals);



//---------------------------------------------------
// configure all AIPI1 peripherals
//--------------------------------------------------- 
void
AIPI1_ConfigAll(void);


//---------------------------------------------------
// configure all AIPI2 peripherals
//--------------------------------------------------- 
void
AIPI2_ConfigAll(void);





#endif

⌨️ 快捷键说明

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