📄 lh7a400_evb_cpld_driver.h
字号:
/**********************************************************************
* $Workfile: LH7A400_EVB_CPLD_driver.h $
* $Revision: 1.10 $
* $Author: MaysR $
* $Date: Aug 20 2002 10:09:42 $
*
* Project: LH7A400
*
* Description:
* LH7A400 EVB CPLD device driver header file
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/CHIPS/archives/LH7A400/CPLD/Drivers/LH7A400_EVB_CPLD_driver.h-arc $
*
* Rev 1.10 Aug 20 2002 10:09:42 MaysR
* Added parameter to init functions to allow soft init.
*
* Rev 1.9 Aug 14 2002 18:45:06 MaysR
* Changed function names for LCD control functions to correctly
* reflect what the functions do.
*
* Cosmetic changes to meet coding standard.
*
* Rev 1.8 Jul 09 2002 16:32:08 MaysR
* Corrected errors in parameter usage for arguments
* passed to interrupt handler functions.
* Corrected error in external interrupt clear function.
* Added new typedef for push button interrupts.
* Changed case of typdefs to comply with coding standard
*
* Rev 1.7 Jun 20 2002 13:26:44 MaysR
* Changed all function names to comply with coding standard
*
* Rev 1.6 Jun 13 2002 16:31:38 MaysR
* Added Sharp legal disclaimer
*
* Rev 1.5 Jun 13 2002 15:45:02 MaysR
* Changed defined name for interrupt number.
*
* Rev 1.4 Jun 05 2002 20:29:58 MaysR
* Added CPLD interrupt souce defines.
* Added declarations for interrupt setup and install functions.
*
* Rev 1.3 Jan 10 2002 11:44:14 KovitzP
* Included SMA_types.h
*
* Rev 1.2 Nov 20 2001 18:56:24 SuryanG
* Added 22 new interface functions.
* Added two new exported type definitions.
* Moved to CPLD directory.
*
* Rev 1.1 Nov 08 2001 18:15:00 SuryanG
* No code change. Added file banner.
*
* Rev 1.0 Nov 07 2001 19:00:14 SuryanG
* 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
*********************************************************************/
#if !defined(LH7A400_EVB_CPLD_H)
#define LH7A400_EVB_CPLD_H
#include "SMA_types.h"
/* Exported types */
typedef enum
{
PB_SW10 = 0,
PB_SW11,
PB_SW12,
PB_SW13,
PB_SW14,
PB_SW15,
PB_SW16,
PB_SW17
}PLD_PB_INT_T;
typedef enum
{
NMMC_CD = 8,
NRI2,
IDE_CF,
ETH_INT,
SW3_INT
}PLD_EXT_INT_T;
typedef enum
{
FLASH = 0,
SYNCFLASH,
SRAM
}PLD_BOOT_DEVICE_T;
typedef enum
{
WEAK = 0,
FORCE = 1
}INIT_MODE_T;
/* GPIO port F bit number for CPLD interrupt */
#define LH7A400_EVB_CPLD_INT (1)
/* Interrupt source shadow register defines */
#define CPLD_INT_NSOURCES (13)
#define CPLD_MISC_INT_STAT_FIELD (5)
#define CPLD_PB_INT_STAT_FIELD (8)
/* Interrupt source priority defines */
#define CPLD_ETH_INT_PRIO (0)
#define CPLD_CF_IDE_INT_PRIO (1)
#define CPLD_MMC_CD_INT_PRIO (2)
#define CPLD_RI2_INT_PRIO (3)
#define CPLD_SW3_INT_PRIO (4)
#define CPLD_PB_SW10_INT_PRIO (5)
#define CPLD_PB_SW11_INT_PRIO (6)
#define CPLD_PB_SW12_INT_PRIO (7)
#define CPLD_PB_SW13_INT_PRIO (8)
#define CPLD_PB_SW14_INT_PRIO (9)
#define CPLD_PB_SW15_INT_PRIO (10)
#define CPLD_PB_SW16_INT_PRIO (11)
#define CPLD_PB_SW17_INT_PRIO (12)
/* Interrupt source bit numbers */
#define CPLD_PB_SW10_INT_BIT (0)
#define CPLD_PB_SW11_INT_BIT (1)
#define CPLD_PB_SW12_INT_BIT (2)
#define CPLD_PB_SW13_INT_BIT (3)
#define CPLD_PB_SW14_INT_BIT (4)
#define CPLD_PB_SW15_INT_BIT (5)
#define CPLD_PB_SW16_INT_BIT (6)
#define CPLD_PB_SW17_INT_BIT (7)
#define CPLD_MMC_CD_INT_BIT (8)
#define CPLD_RI2_INT_BIT (9)
#define CPLD_CF_IDE_INT_BIT (10)
#define CPLD_ETH_INT_BIT (11)
#define CPLD_SW3_INT_BIT (12)
/* Exported Functions */
void LH7A400_pld_init(INIT_MODE_T force);
INT_8 LH7A400_pld_irq_setup(INT_8 priority, INIT_MODE_T force);
INT_8 LH7A400_pld_install_int_handler(INT_8 source,
INT_8 priority,
void (*hp)(void));
INT_8 LH7A400_pld_remove_int_handler(INT_8 source);
INT_8 LH7A400_pld_irq_next_available(INT_8 range_start, INT_8 range_end);
void LH7A400_pld_lcd_pwr_enable(void);
void LH7A400_pld_cstn_power_on(void);
void LH7A400_pld_lcd_output_enable(void);
void LH7A400_pld_lcd_backlight_on(void);
void LH7A400_pld_lcd_backlight_off(void);
void LH7A400_pld_lcd_output_disable(void);
void LH7A400_pld_cstn_power_off(void);
void LH7A400_pld_lcd_pwr_disable(void);
UNS_8 LH7A400_pld_get_display_brd_switch(void);
void LH7A400_pld_lcd_display_enable(void);
void LH7A400_pld_lcd_display_disable(void);
void LH7A400_pld_enable_ext_int(PLD_EXT_INT_T intr);
void LH7A400_pld_disable_ext_int(PLD_EXT_INT_T intr);
void LH7A400_pld_enable_pb_int(PLD_PB_INT_T button);
void LH7A400_pld_disable_pb_int(PLD_PB_INT_T button);
UNS_16 LH7A400_pld_read_row_sense(void);
PLD_BOOT_DEVICE_T LH7A400_pld_get_boot_device(void);
UNS_32 LH7A400_pld_mmc_card_present(void);
UNS_32 LH7A400_pld_mmc_write_protected(void);
UNS_8 LH7A400_pld_get_ext_int_status(void);
void LH7A400_pld_clear_ext_int(PLD_EXT_INT_T intr);
UNS_8 LH7A400_pld_get_pb(void);
void LH7A400_pld_mmc_enable_pwr(void);
void LH7A400_pld_mmc_disable_pwr(void);
void LH7A400_pld_eth_sleep(void);
void LH7A400_pld_eth_wake(void);
void LH7A400_pld_i2s_enable_pwr(void);
void LH7A400_pld_i2s_disable_pwr(void);
void LH7A400_pld_ac97_enable_pwr(void);
void LH7A400_pld_ac97_disable_pwr(void);
void LH7A400_pld_pc_card_pwr_enable(UNS_32 card, UNS_32 pwr);
void LH7A400_pld_pc_card_pwr_disable(UNS_32 card);
UNS_8 LH7A400_pld_get_option_sw(void);
#endif /*LH7A400_EVB_CPLD_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -