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

📄 lh79524_wdt_driver.h

📁 SHARP_ARM720T_LH79524/5软件开发包_支持TFT_LCD_NAND_FLASH_ETH_USB
💻 H
字号:
/***********************************************************************
 * $Workfile:   lh79524_wdt_driver.h  $
 * $Revision:   1.0  $
 * $Author:   ZhangJ  $
 * $Date:   Oct 20 2004 10:38:16  $
 *
 * Project: LH79524 WDT driver
 *
 * Description:
 *     This file contains driver support for the WDT module on the
 *     LH79524
 *
 * Revision History:
 * $Log:   //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh79524/include/lh79524_wdt_driver.h-arc  $
 * 
 *    Rev 1.0   Oct 20 2004 10:38:16   ZhangJ
 * Initial revision.
 * 
 *    Rev 1.0   Jul 07 2003 16:41:02   LiJ
 * Initial revision.
 * 
 *
 ***********************************************************************
 * 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.
 *
 * COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *     CAMAS, WA
 **********************************************************************/

#ifndef LH79524_WDT_DRIVER_H
#define LH79524_WDT_DRIVER_H

#ifdef __cplusplus
extern "C" {
#endif

#include "lh79524_wdt.h"

/***********************************************************************
 * WDT device configuration commands (IOCTL commands and arguments)
 **********************************************************************/

/* WDT device commands (IOCTL commands) */
typedef enum {
    WDT_ENABLE,     /* Enable watchdog timer, no args */
    WDT_DISABLE,    /* Disable watchdog timer, no args */
    WDT_FREEZE,     /* Freeze and enable watchdog timer, no args */
    WDT_RESET,      /* Perform a watchdog reset to prevent time out,
                       no args */
    WDT_RESET_ON_TIMEOUT,   /* Set watchdog timer RESET the chip on 
                               time out, no args */                
    WDT_INT_ON_TIMEOUT,  /* Set watchdog timer generate interrupt
                            on first time out, no args */
    WDT_SET_COUNT,      /* Set watchdog count value, arg = 0 to 15, which
                       represents 2**16 to 2**31 PCLKS per WDT tick */
    WDT_CLEAR_INT,  /* Clear the interrupt caused by WDT time out */
    WDT_GET_STATUS  /* Get a watchdog status, use an argument type of
                       WDT_IOCTL_STS_T as the argument to return the
                       correct status */
} WDT_IOCTL_CMD_T;

/* WDT device arguments for WDT_GET_STATUS command (IOCTL arguments) */
typedef enum {
    WDT_GET_ENABLE, /* Returns watchdog enable status (TRUE = enabled, 
                       FALSE = disabled */
    WDT_GET_FREEZE, /* Returns watchdog freeze status (TRUE = frozen, 
                       FALSE = not frozen */
    WDT_GET_INT_FIRST, /* Returns interrupt first state (TRUE = 
                       interrupt first mode enabled, FALSE = interrupt 
                       first mode disabled */
    WDT_GET_RESET_TRIGGERED,  /* Returns watchdog system reset status 
                       (TRUE = system reset has not occurred, FALSE = 
                       system reset has occurred */
    WDT_GET_INT_TRIGGERED,     /* Returns WDTINT status (TRUE = INT has 
                       occurred, FALSE = INT has not occured */
    WDT_GET_COUNT  /* Return watchdog count value, a value between 0
                       and 15, which represents 2**16 to 2**31 PCLKS
                       per WDT tick */
} WDT_IOCTL_STS_T;

/***********************************************************************
 * WDT device configuration structure
 **********************************************************************/

/* WDT device configuration structure */
typedef struct
{
    INT_32 init;       /* Device initialized flag */
    WDT_REGS_T *regptr; /* Pointer to WDT registers */
} WDT_CFG_T;

/***********************************************************************
 * WDT driver functions
 **********************************************************************/
/* Open the watchdog timer */
INT_32 wdt_open(void *ipbase, INT_32 arg);

/* Close the watchdog timer */
STATUS wdt_close(INT_32 devid);

/* Watchdog timer configuration block */
STATUS wdt_ioctl(INT_32 devid,
                 INT_32 cmd,
                 INT_32 arg);

/* WDT read function (stub only) */
INT_32 wdt_read(INT_32 devid,
                void *buffer,
                INT_32 max_bytes);

/* WDT write function (stub only) */
INT_32 wdt_write(INT_32 devid,
                 void *buffer,
                 INT_32 n_bytes);

#ifdef __cplusplus
}
#endif

#endif /* LH79524_WDT_DRIVER_H */

⌨️ 快捷键说明

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