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

📄 sdk7a400_cpld_driver.h

📁 Sharp LH7A400 BSP平台无关部分的代码,有很高的参考价值,尤其是系统架构设计上,设计成移植度很高的BSP.
💻 H
字号:
/***********************************************************************
 * $Workfile:   sdk7a400_cpld_driver.h  $
 * $Revision:   1.3  $
 * $Author:   WellsK  $
 * $Date:   Mar 18 2004 10:48:24  $
 *
 * Project: LogicPD SDKA400 CPLD driver
 *
 * Description:
 *     This file contains driver support for the CPLD module on the
 *     SDKA400 EVB.
 *
 * Revision History:
 * $Log:   //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh7a400/bsps/sdk7a400/include/sdk7a400_cpld_driver.h-arc  $
 * 
 *    Rev 1.3   Mar 18 2004 10:48:24   WellsK
 * Various changes to support card engine rev. B. Some functions
 * that weren't needed for the rev. A card engines were removed.
 * 
 *    Rev 1.2   Aug 12 2003 15:10:20   WellsK
 * Added support for LCD VEEEN signal.
 * 
 *    Rev 1.1   Jul 02 2003 17:55:04   WellsK
 * Updated GPIO direction logic based on design information.
 * 
 *    Rev 1.0   Jun 19 2003 11:04:14   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 SDK7A400_CPLD_DRIVER_H
#define SDK7A400_CPLD_DRIVER_H

#ifdef __cplusplus
extern "C" {
#endif

#include "abl_types.h"
#include "sdk7a400_board.h"

/***********************************************************************
 * CPLD driver enumerations and defines
 **********************************************************************/

/* Flash status bit enumerations */
typedef enum {CPLD_STS1, CPLD_STS2} CPLD_FLASH_STS_T;

/* Possible LED enumerations */
typedef enum {LED_GPIO,
              LED_STATUS1,
              LED_STATUS2
} CPLD_LED_TYPE;

/* CPLD GPIO data direction control */
typedef enum
{
    CPLD_GPIO_OUTPUT,      /* GPIO configured as output */
    CPLD_GPIO_INPUT        /* GPIO configured as input */
} CPLD_GPIO_DIR_T;

/***********************************************************************
 * CPLD driver functions
 **********************************************************************/

/* Initializes the CPLD driver */
void cpld_init(void);

/* Enable or disable LAN power */
void cpld_enable_lan_power(BOOL_32 enable);

/* Enable or disable the LCD VEEEN signal */
void cpld_enable_lcd_veeen(BOOL_32 enable);

/* Disable or enable the LAN interrupt */
void cpld_lan_int_enable(BOOL_32 enable);

/* Disable or enable the touchscreen interrupt */
void cpld_ts_int_enable(BOOL_32 enable);

/* Disable or enable the CPLD interrupt */
void cpld_int_enable(BOOL_32 enable);

/* Disable or enable the USB 1 connection interrupt */
void cpld_usb1c_int_enable(BOOL_32 enable);

/* Return LAN interrupt pending status */
BOOL_32 cpld_lan_int_pending(void);

/* Return touchscreen interrupt pending status */
BOOL_32 cpld_ts_int_pending(void);

/* Return CPLD interrupt pending status */
BOOL_32 cpld_int_pending(void);

/* Return USB 1 connection interrupt pending status */
BOOL_32 cpld_usb1c_int_pending(void);

/* Enable or disable FLASH programming */
void cpld_enable_flash_prog(BOOL_32 enable);

/* Read FLASH STS1 or STS2 bit */
BOOL_32 cpld_get_flash_sts(CPLD_FLASH_STS_T flash_sts);

/* Set or disable an application board LED */
void cpld_enable_led(CPLD_LED_TYPE led, BOOL_32 set);

/* Set direction of CPLD GPIO data bit 0 */
void cpld_set_gpio_dir(CPLD_GPIO_DIR_T gpio_dir);

/* Set the CPLD GPIO data register */
void cpld_set_gpio_data(UNS_8);

/* Get the CPLD GPIO data register */
UNS_8 cpld_get_gpio_data(void);

/* Enable or disable USB 1 power */
void cpld_usb1pwr_enable(BOOL_32 enable);

#ifdef __cplusplus
}
#endif

#endif /* SDK7A400_CPLD_DRIVER_H */

⌨️ 快捷键说明

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