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

📄 bsp_gpio.h

📁 Microsoft WinCE 6.0 BSP FINAL release source code for use with the i.MX27ADS TO2 WCE600_FINAL_MX27_S
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
// Copyright (C) 2004-2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//------------------------------------------------------------------------------
//
// Header: bsp_gpio.h
//
// Provides GPIO interrupt and IO pin configuration macro specific MX27 ADS.
//
//------------------------------------------------------------------------------
#ifndef __BSP_GPIO_H__
#define __BSP_GPIO_H__

#if __cplusplus
extern "C" {
#endif

//------------------------------------------------------------------------------
//
// GPIO configuration setting macros:
// 
// These configuration setting macros are used to fill in the DDK_GPIO_CFG 
// structure. Each set of macros is defined for a certain module/function.
// Each set a macros is identified via an unique name. ie <MODULE>
//
//  MACRO                       settings
//  GPIO_<MODULE>_PORT          A / B / C / D / E / F 
//  GPIO_<MODULE>_CONFIG_TYPE   PRI / ALT / MODULEIO / INT / IO
//  GPIO_<MODULE>_MASK          set to 1 for pins used (for PRI, ALT and INT only)
//  GPIO_<MODULE>_IN_MASK       set to 1 for input pins (for MODULEIO and IO only)
//  GPIO_<MODULE>_OUT_MASK      set to 1 for output pins (for MODULEIO and IO only)
//  GPIO_<MODULE>_IN_DEST       AOUT / BOUT / MAX (for MODULEIO only, sets input pin dest)
//  GPIO_<MODULE>_OUT_SOURCE    AIN / BIN / CIN / MAX (for MODULEIO only, sets output pin source)
//  GPIO_<MODULE>_PIN           0 to 31 (For INTR, IO only)
//  GPIO_<MODULE>_INT_TYPE      POSLEVEL / POSEDGE / NEGLEVEL / NEGEDGE (for INT only)
//
// NOTES:
//  1) "MAX" means non applicable.
//  2) (PRI, ALT, MODULEIO) are defined here as these are chip specific.
//  3) (INT and IO macros) are defined in bsp_gpio.h since these are BSP 
//     specific.
//
//------------------------------------------------------------------------------
// Ethernet IRQ         INTR_ETH
#define GPIO_INTR_ETH_PORT                GPIO_PORT(C)
#define GPIO_INTR_ETH_PIN                   15
#define GPIO_INTR_ETH_MASK                GPIO_PIN_MASK(GPIO_INTR_ETH_PIN)
#define GPIO_INTR_ETH_CONFIG_TYPE   INT
#define GPIO_INTR_ETH_INT_LEVEL        GPIO_INT_TYPE(POSLEVEL)
#define GPIO_INTR_ETH_INT_EDGE         GPIO_INT_TYPE(POSEDGE)
#define GPIO_INTR_ETH_INT_TYPE          GPIO_INTR_ETH_INT_LEVEL


// PMIC IRQ         INTR_PMIC
#define GPIO_INTR_PMIC_PORT                GPIO_PORT(C)
#define GPIO_INTR_PMIC_PIN                   14
#define GPIO_INTR_PMIC_MASK                GPIO_PIN_MASK(GPIO_INTR_PMIC_PIN)
#define GPIO_INTR_PMIC_CONFIG_TYPE   		INT
#define GPIO_INTR_PMIC_INT_LEVEL        GPIO_INT_TYPE(POSLEVEL)
#define GPIO_INTR_PMIC_INT_EDGE         GPIO_INT_TYPE(POSEDGE)
#define GPIO_INTR_PMIC_INT_TYPE          GPIO_INTR_PMIC_INT_LEVEL


#ifdef __cplusplus
}
#endif

#endif // __BSP_GPIO_H__

⌨️ 快捷键说明

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