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 />

Examples:<br />

Example Files:<br />

Also See:<br />

if(checksum!=0)<br />

reset_cpu();<br />

None<br />

None<br />

restart_cause( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

value = restart_cause()<br />

None<br />

A value indicating the cause of the last processor reset. The actual values are<br />

device dependent. See the device .h file for specific values for a specific device.<br />

Some example values are: WDT_FROM_SLEEP, WDT_TIMEOUT,<br />

MCLR_FROM_SLEEP and NORMAL_POWER_UP.<br />

Returns the cause of the last processor reset.<br />

All devices<br />

Constants are defined in the devices .h file.<br />

Examples:<br />

switch ( restart_cause() ) {<br />

case WDT_FROM_SLEEP:<br />

case WDT_TIMEOUT:<br />

}<br />

handle_error();<br />

Example Files:<br />

Also See:<br />

ex_wdt.c<br />

restart_wdt(), reset_cpu()<br />

restart_wdt( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

restart_wdt()<br />

None<br />

undefined<br />

253

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

Saved successfully!

Ooh no, something went wrong!