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

📄 gpiodrv.h

📁 此压缩包为杰得开发得z228的BSP的源代码,可以实现很多功能,尤其是视频解码有很好的效果.
💻 H
字号:
/*
 * ------------------------
 *
 * Jade chip 
 *
 * ------------------------
 * File:     gpiodrv.h,v
 * Revision: 1.1
 * ----------------------------------------------------------------
 * $
 */
#include <windows.h>


// These defines determine which GPIO devices should be accessed
//#define GPIO2   TRUE
//#define GPIO3 TRUE
//#define GPIO4 TRUE

#define DWORD unsigned long

#define GPIO5_BASE  PHYS_GPIO5_BASE
#define GPIO6_BASE  PHYS_GPIO6_BASE


#define GPIO1_PIN_MASK  0x000000FF
#define GPIO2_PIN_MASK  0x0000FF00
#define GPIO3_PIN_MASK  0x00FF0000
#define GPIO4_PIN_MASK  0xFF000000

typedef struct tagGPIORegisters {
    DWORD   GPIOData;               // GPIO_BASE
    DWORD   Padding1[255];          // GPIO_BASE + 0x004
    DWORD   GPIODir;                // GPIO_BASE + 0x400
#if 0    
    DWORD   GPIOIS;                 // GPIO_BASE + 0x404
    DWORD   GPIOIBE;                // GPIO_BASE + 0x408
    DWORD   GPIOIEV;                // GPIO_BASE + 0x40C
    DWORD   GPIOIE;                 // GPIO_BASE + 0x410
    DWORD   GPIORIS;                // GPIO_BASE + 0x414
    DWORD   GPIOMIS;                // GPIO_BASE + 0x418
    DWORD   GPIOIC;                 // GPIO_BASE + 0x41C
    DWORD   GPIOAFSEL;              // GPIO_BASE + 0x420

    DWORD   Padding2[751];          // GPIO_BASE + 0x424

    DWORD   GPIOPeriphID0;          // GPIO_BASE + 0xFE0
    DWORD   GPIOPeriphID1;          // GPIO_BASE + 0xFE4
    DWORD   GPIOPeriphID2;          // GPIO_BASE + 0xFE8
    DWORD   GPIOPeriphID3;          // GPIO_BASE + 0xFEC

    DWORD   GPIOCellID0;            // GPIO_BASE + 0xFF0
    DWORD   GPIOCellID1;            // GPIO_BASE + 0xFF4
    DWORD   GPIOCellID2;            // GPIO_BASE + 0xFF8
    DWORD   GPIOCellID3;            // GPIO_BASE + 0xFFC
#endif	
}GPIO_REGS, *PGPIO_REGS;

typedef struct tagGpioInfo {
    volatile PGPIO_REGS pGpio1Regs;
    volatile PGPIO_REGS pGpio2Regs;
    //volatile PGPIO_REGS pGpio3Regs;
    //volatile PGPIO_REGS pGpio4Regs;
}GPIO_INFO, *PGPIO_INFO;

⌨️ 快捷键说明

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