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

📄 main.c

📁 This prj demonstrates how to use the SROM memory classes for the Dallas DS80C400. This example uses
💻 C
字号:
#include <REG400.H>
#include <stdio.h>
#include <string.h>
#include "srom.h"

extern void count (void);

/*---------------------------------------------------------
Define SROM Segment Variables
---------------------------------------------------------*/
SROM_PS (COUNT_COUNTER)

/*-----------------------------------------------------------------------------
-----------------------------------------------------------------------------*/
void main (void)
{
/*---------------------------------------------------------
Copy the count function into RAM
---------------------------------------------------------*/
memcpy (SROM_PS_TRG_FD(COUNT_COUNTER),
        SROM_PS_SRC(COUNT_COUNTER),
        SROM_PS_LEN(COUNT_COUNTER));

/*---------------------------------------------------------
Call the count function (over and over).
---------------------------------------------------------*/
while (1)
  {
  count();
  }
}

⌨️ 快捷键说明

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