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

📄 cplddemo.c

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 C
字号:
 /*****************************************************************************
 *	$Workfile:   cplddemo.c  $
 *	$Revision:   1.0  $
 *	$Author:   WellsK  $
 *	$Date:   Sep 22 2002 10:59:38  $
 *
 *	Project: CPLD pushbutton/7-segment example
 *
 *	Description:
 *    This demo simply reads the pushbutton switch state and outputs the
 *    binary value for the state on the 7-segment displays.
 *
 *	Revision History:
 *	$Log:   //smaicnt2/pvcs/VM/CDROM/archives/KEV7A400/Software/Examples/cplddemo/cplddemo.c-arc  $
 * 
 *    Rev 1.0   Sep 22 2002 10:59:38   WellsK
 * Initial revision.
 * 
 * 
 *	COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *		CAMAS, WA
 ****************************************************************************/

#include "SMA_types.h"
#include "LH7A400_EVB_CPLD_driver.h"
#include "SMA_sevenseg_driver.h"

int main (void)
{
    volatile INT_32 pb;
    INT_32 i;

    // Endless loop, stop this program from the debugger
    while (1)
    {
        // Read switch state and put raw binary value on 7-seg displays
        pb = (INT_32) LH7A400_pld_get_pb ();
        util_set_sevenseg_hexval (pb, 0);

        // This small loop prevents the bus from getting hammered
        for (i = 0; i < 1000; i++);
    }

    return 1;
 }
 

⌨️ 快捷键说明

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