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

📄 lh79524_int_driver.h

📁 SHARP_ARM720T_LH79524/5软件开发包_支持TFT_LCD_NAND_FLASH_ETH_USB
💻 H
字号:
/***********************************************************************
 * $Workfile:   lh79524_int_driver.h  $
 * $Revision:   1.0  $
 * $Author:   ZhangJ  $
 * $Date:   Oct 20 2004 10:38:14  $
 *
 * Project: LH79524 INT driver
 *
 * Description:
 *     This file contains driver support for the INT module on the
 *     LH79524
 *
 * Revision History:
 * $Log:   //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh79524/include/lh79524_int_driver.h-arc  $
 * 
 *    Rev 1.0   Oct 20 2004 10:38:14   ZhangJ
 * Initial revision.
 * 
 *    Rev 1.0   Jul 07 2003 16:40:58   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_INT_DRIVER_H
#define LH79524_INT_DRIVER_H

#ifdef __cplusplus
extern "C" {
#endif

#include "lh79524_vic.h"

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

/* INT device commands (IOCTL commands) */
typedef enum {
    FIQ_GLOBAL_ENABLE,      /* Enable global FIQ interrupt, arg = 1 
                            enable FIQ globally, arg = 0 disable FIQ */
    FIQ_ENABLE_SOURCE,      /* Enable specific VIC source as FIQ and enable
                            this source. arg = VIC source */
    FIQ_DISABLE_SOURCE,     /* Disable specific VIC source to generate
                            FIQ interrupt. arg = VIC source */
    FIQ_SET_HANDLER,        /* Set FIQ interruption handling routine. 
                            arg = handler routine addr */
    FIQ_REMOVE_HANDLER,     /* Remove FIQ handler routine. Set FIQ handling
                            routine as default. no arg */
    FIQ_GET_STATUS,         /* Get a int status, use an argument type of
                            INT_IOCTL_STS_T as the argument to return the
                            correct status */
                       
                       
    IRQ_GLOBAL_ENABLE,      /* Enable global IRQ interrupt, arg = 1 
                            enable IRQ globally, arg = 0 disable IRQ */
    IRQ_ENABLE_SOURCE,      /* Enable specific VIC source as IRQ and enable
                            this source. arg = VIC source */
    IRQ_DISABLE_SOURCE,     /* Disable specific VIC source to generate
                            IRQ interrupt. arg = VIC source */
    IRQ_SET_CURRENT_SOURCE, /* Set the VIC source for the operation - 
                            IRQ_SET_PRIORITY and IRQ_SET_HANDLER. arg =
                            VIC source */
    IRQ_SET_PRIORITY,       /* Set IRQ priority of the current VIC source.
                            arg = priority from 0 to 15 */
    IRQ_SET_HANDLER,        /* Set IRQ interruption handling routine for 
                            current VIC source. arg = handler routine addr */
    IRQ_REMOVE_HANDLER,     /* Remove IRQ handler for specific VIC source. 
                            Remove this source from VIC controller. arg =
                            VIC source */
    IRQ_GET_STATUS,         /* Get a int status, use an argument type of
                            INT_IOCTL_STS_T as the argument to return the
                            correct status */
                       
                       
    SWI_ENABLE_SOURCE,      /* Enable specific VIC source as SWI and enable
                            this source. arg = VIC source */
    SWI_DISABLE_SOURCE,     /* Disable specific VIC source to generate
                            SWI interrupt. arg = VIC source */
    SWI_SET_HANDLER,        /* Set SWI interruption handling routine. 
                            arg = handler routine addr */
    SWI_REMOVE_HANDLER,     /* Remove SWI handler routine. Set SWI handling
                            routine as default. no arg */
    SWI_GET_STATUS          /* Get a int status, use an argument type of
                            INT_IOCTL_STS_T as the argument to return the
                            correct status */
                       
} INT_IOCTL_CMD_T;

/* INT device arguments for INT_GET_STATUS command (IOCTL arguments) */
typedef enum {
    IRQ_GET_ENABLE,         /* Returns IRQ enable status (status = all 32
                            source IRQ enable status) */
    IRQ_GET_PENDING,        /* Returns pending IRQ status (status = all 32
                            source, bits indicating which source IRQ
                            pending */
    IRQ_GET_RAW,            /* Returns raw IRQ status (status = all 32 source
                            bits indicating which source raw IRQ happended */
    IRQ_GET_HANDLER,        /* Returns IRQ handling routine address. 
                            IRQ_SET_CURRENT_SOURCE must be called before this */
                            
    FIQ_GET_ENABLE,         /* Returns FIQ enable status (status = all 32
                            source FIQ enable status) */
    FIQ_GET_PENDING,        /* Returns pending FIQ status (status = all 32
                            source, bits indicating which source FIQ
                            pending */
    FIQ_GET_RAW,            /* Returns raw FIQ status (status = all 32 source
                            bits indicating which source raw FIQ happended */
    FIQ_GET_HANDLER,        /* Returns FIQ handling routine address */
                            
    SWI_GET_ENABLE,         /* Returns SWI enable status (status = all 32
                            source SWI enable status) */
    SWI_GET_PENDING,        /* Returns pending SWI status (status = all 32
                            source, bits indicating which source SWI
                            pending */
    SWI_GET_HANDLER         /* Returns SWI handling routine address */
                            
                            
} INT_IOCTL_STS_T;

/***********************************************************************
 * INT device configuration structure
 **********************************************************************/

/* INT device configuration structure */
typedef struct
{
    INT_32 init;       /* Device initialized flag */
} INT_CFG_T;

/***********************************************************************
 * INT driver functions
 **********************************************************************/
/* Open the IRQ interrupt */
INT_32 irq_open(void *ipbase, INT_32 arg);

/* Open the FIQ interrupt */
INT_32 fiq_open(void *ipbase, INT_32 arg);

/* Open the SWI interrupt */
INT_32 swi_open(void *ipbase, INT_32 arg);

/* Close the IRQ interrupt */
STATUS irq_close(INT_32 devid);

/* Close the FIQ interrupt */
STATUS fiq_close(INT_32 devid);

/* Close the SWI interrupt */
STATUS swi_close(INT_32 devid);

/* IRQ configuration block */
STATUS irq_ioctl(INT_32 devid,
                 INT_32 cmd,
                 INT_32 arg);

/* FIQ configuration block */
STATUS fiq_ioctl(INT_32 devid,
                 INT_32 cmd,
                 INT_32 arg);

/* SWI configuration block */
STATUS swi_ioctl(INT_32 devid,
                 INT_32 cmd,
                 INT_32 arg);

/* INT read function (stub only) */
INT_32 int_read(INT_32 devid,
                void *buffer,
                INT_32 max_bytes);

/* INT write function (stub only) */
INT_32 int_write(INT_32 devid,
                 void *buffer,
                 INT_32 n_bytes);

INT_32 init_irq_interrupts(void);

INT_32 create_irq_interrupt(UNS_32 source, UNS_32 vector, PFV handler);


#ifdef __cplusplus
}
#endif

#endif /* LH79524_INT_DRIVER_H */

⌨️ 快捷键说明

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