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

📄 dio.h

📁 TDK 6521 SOC 芯片 DEMO程序
💻 H
字号:
/***************************************************************************
 * This code and information is provided "as is" without warranty of any   *
 * kind, either expressed or implied, including but not limited to the     *
 * implied warranties of merchantability and/or fitness for a particular   *
 * purpose.                                                                *
 *                                                                         *
 * Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.    *
 ***************************************************************************/
//**************************************************************************
//  DESCRIPTION: 71M652x - DIO structures, enumerations, and defines.
//
//  AUTHOR:  MTF
//
//  HISTORY: see end of file.
//***************************************************************************
//  File: DIO.H
//       
#ifndef _DIO
#define _DIO

/////////////////////////////////////////////////////////////////////////////
//***************************************************************************
//* DIO DEFINITIONS AND DECLARATIONS
//***************************************************************************
/////////////////////////////////////////////////////////////////////////////

enum eDIO_PIN { PIN0,   PIN1,   PIN2,   PIN3,   PIN4,   PIN5,   PIN6,   PIN7,
                PIN8,   PIN9,   PIN10,  PIN11,  PIN12,  PIN13,  PIN14,  PIN15,
                PIN16,  PIN17,  PIN18,  PIN19,  PIN20,  PIN21 };

enum eDIO_DIRECTION { INPUT, OUTPUT };

#define PIN_PORT(x) (x / 8)
#define PIN_BIT(x)  (x % 8)

/*
#define PIN_CONFIG(p,d) \
#if (PIN_PORT(p) == 0) DIR0.PIN_BIT(p) = v;
#if (PIN_PORT(p) == 1) DIR1.PIN_BIT(p) = v;
#if (PIN_PORT(p) == 2) DIR2.PIN_BIT(p) = v;

#define PIN_READ(p) \
#if (PIN_PORT(p) == 0) USER0.PIN_BIT(p);
#if (PIN_PORT(p) == 1) USER1.PIN_BIT(p);
#if (PIN_PORT(p) == 2) USER2.PIN_BIT(p);

#define PIN_WRITE(p,v) \
#if (PIN_PORT(p) == 0) USER0.PIN_BIT(p)	= v;
#if (PIN_PORT(p) == 1) USER1.PIN_BIT(p)	= v;
#if (PIN_PORT(p) == 2) USER2.PIN_BIT(p)	= v;
*/

/***************************************************************************
 * History
 * $Log: dio.h,v $
 * Revision 1.8  2006/09/09 01:15:12  gmikef
 * *** empty log message ***
 *
 * Revision 1.6  2005/09/22 23:45:25  tvander
 * Clean build all models and unit tests, updated copyright to be fore Teridian
 *
 * Revision 1.5  2005/04/30 02:17:03  gmikef
 * *** empty log message ***
 *
 * Revision 1.4  2005/04/28 19:12:25  tvander
 * Comments only!  Restored history comments.
 *
 * Revision 1.3  2005/04/27 23:45:28  gmikef
 * Some MATH rountines now use 'idata'.
 * Added MATH_FAST flag to 'options.h".
 * Changed "6521B.Uv2" to max optimization.
 *
 * Revision 1.2  2005/04/21 02:05:45  gmikef
 * *** empty log message ***
 *
 * Revision 1.1  2005/04/06 18:10:31  gmikef
 * *** empty log message ***
 *
 * Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.    *
 * this program is fully protected by the United States copyright          *
 * laws and is the property of Teridian Semiconductor Corporation.         *
 ***************************************************************************/
#endif  /* dio.h */

⌨️ 快捷键说明

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