📄 efil1.c
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : EFil1.C
** Project : text
** Processor : 56F8346
** Beantype : ExternalFile
** Version : Bean 02.014, Driver 01.01, CPU db: 2.87.097
** Compiler : Metrowerks DSP C Compiler
** Date/Time : 2009-1-10, 11:18
** Abstract :
** This bean implements a programming support tool - including
** an external binary file to the project.
** The binary file is here represented as a constant array of
** 8-bit values.
** Single elements are indexed 0 to GetSize()-1.
** Settings :
** Filename : text.txt
** Length : 23 bytes
** Contents :
** GetSize - dword EFil1_GetSize(void);
** GetAddr - void* EFil1_GetAddr(void);
** GetValue - byte EFil1_GetValue(dword Index);
**
** (c) Copyright UNIS, spol. s r.o. 1997-2005
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
/* MODULE EFil1. */
#include "PE_Error.h"
#include "EFil1.h"
/* Data table */
static const byte FileArray[23]= {
49, 50, 51, 52, 53, 54, 55, 54,
56, 56, 56, 57, 53, 55, 54, 53,
56, 55, 56, 57, 57, 55, 54
};
/*
** ===================================================================
** Method : EFil1_GetSize (bean ExternalFile)
**
** Description :
** This method returns the number of elements of the array
** representing the binary file (= length of the file in
** bytes).
** Parameters : None
** Returns :
** --- - Size of the array
** ===================================================================
*/
dword EFil1_GetSize(void)
{
return 23; /* Return size of the data table */
}
/*
** ===================================================================
** Method : EFil1_GetAddr (bean ExternalFile)
**
** Description :
** This method returns a pointer to the array of values
** representing the binary file (e.g. pointer to the first
** element of the array).
** Parameters : None
** Returns :
** --- - Pointer to the constant array
** ===================================================================
*/
byte* EFil1_GetAddr(void)
{
return (byte *)FileArray; /* Return address of the data table */
}
/*
** ===================================================================
** Method : EFil1_GetValue (bean ExternalFile)
**
** Description :
** This method returns an element (one byte) of the array
** representing the binary file. The values are numbered
** from zero (index=0 and more).
** Parameters :
** NAME - DESCRIPTION
** Idx - Index of the element (0 to
** 22)
** Returns :
** --- - Value of the array element
** ===================================================================
*/
byte EFil1_GetValue(dword Idx)
{
return FileArray[Idx]; /* Return required element by the index */
}
/* END EFil1. */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 2.97 [03.74]
** for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -