ds1337.h

来自「这是ep9315单板计算机的ds1337的驱动程序源代码」· C头文件 代码 · 共 73 行

H
73
字号
//************************************************************************
//                                                                      
// Filename: ds1337.h
//                                                                      
// Copyright(c) Cirrus Logic Corporation 2004, All Rights Reserved                       
//
//************************************************************************

#ifndef      _HW_DEFS_
#define     _HW_DEFS_

#define VIRTUAL_SYSTEM_ASIC_REGS_BASE       (0x90000000 | 0x20000000)

#define GPIO_BASE						(VIRTUAL_SYSTEM_ASIC_REGS_BASE + 0x000840000)
#define  GPIO_PGDR                  (volatile ULONG *)(GPIO_BASE + 0x0038)
#define  GPIO_PGDDR                 (volatile ULONG *)(GPIO_BASE + 0x003C)

#define EEDRIVE             (volatile DWORD *)(GPIO_BASE + 0x00C8)

#define   WRITE_ADDRESS				0xD0
#define   READ_ADDRESS				0xD1

typedef union 
{
    struct 
    {
        unsigned int EECLK:1;
        unsigned int EEDATA:1;
        unsigned int UNUSED:30;
    } Field;
    unsigned int Value;

} GPIO_DATA_REG_TYPE;

typedef union 
{
    struct 
    {
        unsigned int EECLK:1;
        unsigned int EEDATA:1;
        unsigned int UNUSED:30;
    } Field;
    unsigned int Value;

} GPIO_DATA_DIR_REG_TYPE;

typedef struct tGPIO
{
    GPIO_DATA_REG_TYPE          PGDR;                   // 0038
    GPIO_DATA_DIR_REG_TYPE      PGDDR;                  // 003C
}GPIOG;







typedef struct _SYSTEMTIME { 
    unsigned long wYear; 
    unsigned long wMonth; 
    unsigned long wDayOfWeek; 
    unsigned long wDay; 
    unsigned long wHour; 
    unsigned long wMinute; 
    unsigned long wSecond; 
    unsigned long wMilliseconds; 
} SYSTEMTIME, *PSYSTEMTIME; 


#endif

⌨️ 快捷键说明

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