SW006013 Microchip Technology, SW006013 Datasheet - Page 198

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
DS51456E-page 194
read
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Default Behavior:
File:
sbrk
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Default Behavior:
File:
Read data from a file.
None
int read(int handle, void *buffer,
handle
buffer
len
Returns the number of characters read, which may be less than len if
there are fewer than len characters left in the file or if the file was
opened in text mode, in which case each carriage return-linefeed
(CR-LF) pair is replaced with a single linefeed character. Only the sin-
gle linefeed character is counted in the return value. The replacement
does not affect the file pointer. If the function tries to read at end-of-file,
it returns ‘0’. If the handle is invalid, or the file is not open for reading, or
the file is locked, the function returns ‘-1’.
This helper function is called by the Standard C Library functions
fgetc(), fgets(), fread(), and gets().
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.
read.c
Extend the process' data space by a given increment.
None
void * sbrk(int incr);
incr
Return the start of the new space allocated, or ‘-1’ for errors.
sbrk() adds incr characters to the break value and changes the
allocated space accordingly. incr can be negative, in which case the
amount of allocated space is decreased.
sbrk() is used to dynamically change the amount of space allocated
for the calling process's data segment. The change is made by reset-
ting the process's break value and allocating the appropriate amount of
space. The break value is the address of the first location beyond the
end of the data segment. The amount of allocated space increases as
the break value increases.
This is a helper function called by the Standard C Library function
malloc().
If the global variable __curbrk is zero, the function calls brk() to ini-
tialize the break value. If brk() returns -1, so does this function.
If the incr is zero, the current value of the global variable __curbrk
is returned.
If the incr is non-zero, the function checks that the address
(__curbrk + incr) is less than the end address of the heap. If it is
less, the global variable __curbrk is updated to that value, and the
function returns the unsigned value of __curbrk.
Otherwise, the function returns -1.
See the description of brk().
sbrk.c
unsigned int len);
handle referring to an opened file
points to the storage location for read data
the maximum number of characters to read
number of characters to increment/decrement
© 2008 Microchip Technology Inc.

Related parts for SW006013