17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Built-in Functions<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

Any device.<br />

#use profile() used somewhere in the project source code.<br />

// send a simple string.<br />

profileout("This is a text string");<br />

// send a variable with a string identifier.<br />

profileout("RemoteSensor=", adc);<br />

// just send a variable.<br />

profileout(adc);<br />

// time how long a block of code takes to execute.<br />

// this will be displayed in the 'Statistics' of the<br />

// Code Profile tool.<br />

profileout("start my algorithm");<br />

/* code goes here */<br />

profileout("stop my algorithm");<br />

ex_profile.c<br />

#use profile(), #profile, Code Profile overview<br />

psp_output_full( ) psp_input_full( ) psp_overflow( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

result = psp_output_full()<br />

result = psp_input_full()<br />

result = psp_overflow()<br />

result = psp_error();<br />

result = psp_timeout();<br />

None<br />

A 0 (FALSE) or 1 (TRUE)<br />

//EPMP only<br />

//EPMP only<br />

Function:<br />

Availability:<br />

Requires:<br />

These functions check the Parallel Slave Port (PSP) for the indicated<br />

conditions and return TRUE or FALSE.<br />

This function is only available on devices with PSP hardware on chips.<br />

Nothing<br />

Examples:<br />

while (psp_output_full()) ;<br />

psp_data = command;<br />

while(!psp_input_full()) ;<br />

if ( psp_overflow() )<br />

error = TRUE;<br />

235

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

Saved successfully!

Ooh no, something went wrong!