📄 lh79524_gpio.h
字号:
/**********************************************************************
* $Workfile: lh79524_gpio.h $
* $Revision: 1.0 $
* $Author: ZhangJ $
* $Date: Oct 20 2004 10:38:12 $
*
* Project: LH79524 GPIO controller header file
*
* Description:
* This file contains the definition for GPIO controller on
* LH79524.
*
* Revision History:
* $Log:: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csp$
*
* Rev 1.0 Oct 20 2004 10:38:12 ZhangJ
* Initial revision.
*
* Rev 1.1 Jul 20 2004 16:50:14 PattamattaD
* Updated comments.
*
* Rev 1.0 Jun 15 2004 14:00:18 PattamattaD
* Initial revision.
*
*
*
***********************************************************************
*
* Copyright (c) 2004 Sharp Microelectronics of the Americas
*
* All rights reserved
*
* SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
* OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
* AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES,
* SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
*
* SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY
* FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A
* SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
* FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
*
**********************************************************************/
#ifndef LH79524_GPIO_H
#define LH79524_GPIO_H
#include "lh79524_chip.h"
/* GPIO Register Structures */
typedef struct
{
volatile UNS_32 dr;
volatile UNS_32 reserveda1;
volatile UNS_32 ddr;
volatile UNS_32 reserveda2;
} GPIO_REGS_T;
/*
* The names and usage of the bit fields in these registers is
* implementation specific, so no bit field constants are defined.
*/
/* Macro pointing to GPIO A registers */
#define GPIOA ((GPIO_REGS_T *)(GPIOAB_BASE))
/* Macro pointing to GPIO B registers */
#define GPIOB ((GPIO_REGS_T *)(GPIOAB_BASE+4))
/* Macro pointing to GPIO C registers */
#define GPIOC ((GPIO_REGS_T *)(GPIOCD_BASE))
/* Macro pointing to GPIO D registers */
#define GPIOD ((GPIO_REGS_T *)(GPIOCD_BASE+4))
/* Macro pointing to GPIO E registers */
#define GPIOE ((GPIO_REGS_T *)(GPIOEF_BASE))
/* Macro pointing to GPIO F registers */
#define GPIOF ((GPIO_REGS_T *)(GPIOEF_BASE+4))
/* Macro pointing to GPIO G registers */
#define GPIOG ((GPIO_REGS_T *)(GPIOGH_BASE))
/* Macro pointing to GPIO H registers */
#define GPIOH ((GPIO_REGS_T *)(GPIOGH_BASE+4))
/* Macro pointing to GPIO I registers */
#define GPIOI ((GPIO_REGS_T *)(GPIOIJ_BASE))
/* Macro pointing to GPIO J registers */
#define GPIOJ ((GPIO_REGS_T *)(GPIOIJ_BASE+4))
/* Macro pointing to GPIO K registers */
#define GPIOK ((GPIO_REGS_T *)(GPIOKL_BASE))
/* Macro pointing to GPIO L registers */
#define GPIOL ((GPIO_REGS_T *)(GPIOKL_BASE+4))
/* Macro pointing to GPIO M registers */
#define GPIOM ((GPIO_REGS_T *)(GPIOMN_BASE))
/* Macro pointing to GPIO N registers */
#define GPION ((GPIO_REGS_T *)(GPIOMN_BASE+4))
/***********************************************************************
* GPIO data and direction Register
**********************************************************************/
/* GPIO ports bit 0 bit */
#define GPIO_PORT_BIT0 0x0000001
/* GPIO ports bit 1 bit */
#define GPIO_PORT_BIT1 0x0000002
/* GPIO ports bit 2 bit */
#define GPIO_PORT_BIT2 0x0000004
/* GPIO ports bit 3 bit */
#define GPIO_PORT_BIT3 0x0000008
/* GPIO ports bit 4 bit */
#define GPIO_PORT_BIT4 0x0000010
/* GPIO ports bit 5 bit */
#define GPIO_PORT_BIT5 0x0000020
/* GPIO ports bit 6 bit */
#define GPIO_PORT_BIT6 0x0000040
/* GPIO ports bit 7 bit */
#define GPIO_PORT_BIT7 0x0000080
#endif /* LH79524_GPIO_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -