Include Files
The include files that are provided with the C51 standard
library are found in the \FSI\INC subdirectory.
These files contain constant and macro definitions, type
definitions, and function prototypes. The following sections
describe the use and contents of each include file. Macros and
functions included in the file are listed as well.
8051 Special Function Register Include Files
- The C51 library provides you with a number of include
files that define manifest constants for the special
function registers found on many 8051 derivatives.
Include files are being added and modifies continuously
check the contents of you \FSI\INC directory for the
include file for you processor. The naming
convention for the processor include files is:
- REGxx.H
If your include file does not exist, you should use the
REG51.H and modify it for your specific processor.
80C517.H
- The 80C517.H include file contains routines
that use the enhanced operational features of the 80C517
CPU and its derivatives. These routines are:
- acos517 asin517 atan517
atof517 cos517 exp517
log10517 log517 printf517
scanf517 sin517 sprintf517
sqrt517 sscanf517 tan517
ABSACC.H
- The ABSACC.H include file contains
definitions for macros that allow you to directly access
the different memory areas of the 8051.
- CBYTE CWORD DBYTE
DWORD PWORD PBYTE
XBYTE XWORD
CTYPE.H
- The CTYPE.H include file contains
definitions and prototypes for routines which classify
ASCII characters and routines which perform character
conversions. The following is a list of these routines:
- isalnum isalpha iscntrl
isdigit isgraph islower
isprint ispunct isspace
isupper isxdigit toint
tolower toupper _tolower
_toupper toascii
INTRINS.H
- The INTRINS.H include file contains
prototypes for routines that instruct the compiler to
generate in-line intrinsic code.
- _crol_ _cror_ _irol_
_iror_ _lrol_ _lror_
_nop_ _testbit_
MATH.H
- The MATH.H include file contains prototypes
and definitions for all routines that perform
floating-point math calculations. Other math functions
are also included in this file. All of the math function
routines are listed below:
- abs acos asin
atan atan2 cabs
ceil cos cosh
exp fabs floor
fprestore fpsave labs
log log10 modf
pow sin sinh
sqrt tan tanh
SETJMP.H
The SETJMP.H include file defines the jmp_buf type
and prototypes the setjmp and longjmp routines
which use it.
STDARG.H
- The STDARG.H include file defines macros
that allow you to access arguments in functions with
variable-length argument lists. The macros include:
- va_arg va_end va_start
In addition, the va_list type is defined in this
file.
STDIO.H
- The STDIO.H include file contains
prototypes and definitions for stream I/O routines. They
are:
- getchar gets printf
putchar puts scanf
sprintf sscanf ungetchar
_getkey
The STDIO.H include file also defines the EOF manifest
constant.
STDLIB.H
- The STDLIB.H include file contains
prototypes and definitions for the type conversion and
memory allocation routines listed below:
- atof atoi atol
calloc free init_mempool
malloc rand realloc
srand
The STDLIB.H include file also defines the NULL manifest
constant.
STRING.H
- The STRING.H include file contains
prototypes for the following string and buffer
manipulation routines:
- memccpy memchr memcmp
memcpy memmove memset
strcat strchr strcmp
strcpy strcspn strlen
strncat strncmp strncpy
strpbrk strpos strrchr
strrpbrk strrpos strspn
The STRING.H include file also defines the NULL manifest
constant.