SW006013 Microchip Technology, SW006013 Datasheet - Page 197

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
lseek
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Default Behavior:
File:
open
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Default Behavior:
File:
Move a file pointer to a specified location.
None
long lseek(int handle, long offset, int origin);
handle
offset
origin
Returns the offset, in characters, of the new position from the beginning
of the file. A return value of ‘-1L’ indicates an error.
This helper function is called by the Standard C Library functions
fgetpos(), ftell(), fseek(), fsetpos, and rewind().
As distributed, the parameters are passed to the host file system
through the simulator. The return value is the value returned by the host
file system.
lseek.c
Open a file.
None
int open(const char *name, int access, int mode);
name
access
mode
If successful, the function returns a file handle, a small positive integer.
This handle is then used on subsequent low-level file I/O operations. A
return value of ‘-1’ indicates an error.
The access flag is a union of one of the following access methods and
zero or more access qualifiers:
0 – Open a file for reading.
1 – Open a file for writing.
2 – Open a file for both reading and writing.
The following access qualifiers must be supported:
0x0008 – Move file pointer to end-of-file before every write operation.
0x0100 – Create and open a new file for writing.
0x0200 – Open the file and truncate it to zero length.
0x4000 – Open the file in text (translated) mode.
0x8000 – Open the file in binary (untranslated) mode.
The mode parameter may be one of the following:
0x0100 – Reading only permitted.
0x0080 – Writing permitted (implies reading permitted).
This helper function is called by the Standard C Library functions
fopen() and freopen().
As distributed, the parameters are passed to the host file system
through the simulator. The return value is the value returned by the host
file system. If the host system returns a value of ‘-1’, the global variable
errno is set to the value of the symbolic constant EFOPEN defined in
<errno.h>.
open.c
refers to an opened file
the number of characters from the origin
the position from which to start the seek. origin may
be one of the following values (as defined in stdio.h):
SEEK_SET – Beginning of file.
SEEK_CUR – Current position of file pointer.
SEEK_END – End-of-file.
name of the file to be opened
access method to open file
type of access permitted
DS51456E-page 193

Related parts for SW006013