17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Built-in Functions<br />

Requires:<br />

#INCLUDE <br />

Examples:<br />

db = log10( read_adc()*(5.0/255) )*10;<br />

Example Files:<br />

Also See:<br />

None<br />

log(), exp(), pow()<br />

longjmp( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

longjmp (env, val)<br />

env: The data object that will be restored by this function<br />

val: The value that the function setjmp will return. If val is 0 then the<br />

function setjmp will return 1 instead.<br />

After longjmp is completed, program execution continues as if the<br />

corresponding invocation of the setjmp function had just returned the<br />

value specified by val.<br />

Performs the non-local transfer of control.<br />

All devices<br />

#INCLUDE <br />

Examples:<br />

longjmp(jmpbuf, 1);<br />

Example Files:<br />

Also See:<br />

None<br />

setjmp()<br />

make8( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

i8 = MAKE8(var, offset)<br />

var is a 16 or 32 bit integer.<br />

offset is a byte offset of 0,1,2 or 3.<br />

An 8 bit integer<br />

Extracts the byte at offset from var. Same as: i8 = (((var >> (offset*8)) & 0xff)<br />

217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!