📄 idk7a400_cpld_driver.h
字号:
/***********************************************************************
* $Workfile: idk7a400_cpld_driver.h $
* $Revision: 1.0 $
* $Author: WellsK $
* $Date: Mar 18 2004 10:53:28 $
*
* Project: LogicPD IDK7A400 CPLD driver
*
* Description:
* This file contains driver support for the CPLD module on the
* IDK7A400 EVB.
*
* Notes:
* Some PCMCIA control functions are controlled directly by GPIO
* signals on the SOC. For those signals, the CPLD isn't really
* involved in their operation, but functions to handle those
* operations are included in this driver for convienence.
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh7a400/bsps/sdk7a400/include/idk7a400_cpld_driver.h-arc $
*
* Rev 1.0 Mar 18 2004 10:53:28 WellsK
* 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 IDK7A400_CPLD_DRIVER_H
#define IDK7A400_CPLD_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "abl_types.h"
#include "idk7a400_board.h"
/***********************************************************************
* CPLD driver enumerations and defines
**********************************************************************/
/* LED indicator enumerations */
typedef enum
{
IDK_STANDBY_LED = 0, /* Standby LED on the IDK */
IDK_SLEEP_LED, /* Sleep LED on the IDK */
IDK_RUN_LED, /* Run LED on the IDK */
IDK_RESET_LED /* Reset LED on the IDK */
} IDK_LED_SELECT_T;
/* IDK miscellaneous signal control */
typedef enum
{
IDK_KEYBOARD_EN, /* Scanning keyboard enable */
IDK_MMC_EN, /* MMC enable */
IDK_AUDIO_EN /* Audio CODEC enable */
} IDK_MISC_SIGNALS_T;
/* IDK PCMCIA slot enumerations */
typedef enum
{
IDK_PCMCIA_SLOTA = 0, /* PCMCIA slot A */
IDK_PCMCIA_SLOTB, /* PCMCIA slot B */
IDK_PCMCIA_SLOTNONE /* No PCMCIA slot */
} IDK_PCMCIA_SLOT_T;
/* IDK Voltage selections for PCMCIA VCC */
typedef enum
{
IDK_PCMCIA_VCC0 = 0, /* Ground VCC */
IDK_PCMCIA_VCC33, /* VCC is 3.3v */
IDK_PCMCIA_VCC50, /* VCC is 5.0v */
IDK_PCMCIA_VCC_RSV /* Reserved VCC */
} IDK_PCMCIA_VCC_T;
/* IDK Voltage selections for PCMCIA VPP */
typedef enum
{
IDK_PCMCIA_VPP0 = 0, /* Ground VPP */
IDK_PCMCIA_VPP33, /* VPP is 3.3v */
IDK_PCMCIA_VPPI, /* VPP is VPPIv */
IDK_PCMCIA_VPP_HIZ /* High impediance */
} IDK_PCMCIA_VPP_T;
/***********************************************************************
* CPLD driver functions
**********************************************************************/
/* Initializes the IDK CPLD drivers */
void idk_cpld_init(void);
/* Read the 16 DIP switches on the IDK */
UNS_16 idk_read_dip(void);
/* Turn on or off an IDK status LED */
void idk_enable_led(IDK_LED_SELECT_T led,
BOOL_32 turnon);
/* Determine if an IDK interrupt is pending in register 0 */
UNS_16 idk_interrupt0_pending(UNS_16 masks);
/* Enable and disable IDK interrupts used in interrupt register 0 */
UNS_16 idk_set_interrupt0_masks(UNS_16 masks,
BOOL_32 enable);
/* Determine if an IDK interrupt is pending in register 1 */
UNS_16 idk_interrupt1_pending(UNS_16 masks);
/* Enable and disable IDK interrupts used in interrupt register 1 */
UNS_16 idk_set_interrupt1_masks(UNS_16 masks,
BOOL_32 enable);
/* Enable or disable an IDK miscellaneous signal */
void idk_misc_enable(IDK_MISC_SIGNALS_T imisc,
BOOL_32 enable);
/* Reset a PCMCIA slot */
void idk_pcmcia_reset(IDK_PCMCIA_SLOT_T pslot,
BOOL_32 assert);
/* Read a PCMCIA slot status */
UNS_16 idk_get_pcmcia_status(IDK_PCMCIA_SLOT_T pslot);
/* Enable or disable the power controller for a slot */
void idk_pcmcia_enable_power(IDK_PCMCIA_SLOT_T pslot,
BOOL_32 enable);
/* Select VCC for a PCMCIA slot */
void idk_pcmcia_vcc_set(IDK_PCMCIA_SLOT_T pslot,
IDK_PCMCIA_VCC_T pvolts);
/* Select VPP for a PCMCIA slot */
void idk_pcmcia_vpp_set(IDK_PCMCIA_SLOT_T pslot,
IDK_PCMCIA_VPP_T pvolts);
#ifdef __cplusplus
}
#endif
#endif /* IDK7A400_CPLD_DRIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -