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

rtc_alarm_write( ) setup_rtc_alarm( )<br />

CAPACITIVE<br />

TOUCH PAD<br />

touchpad_getc( ) touchpad_hit( ) touchpad_state( )<br />

MISC.<br />

setup_opamp1( ) setup_opamp2( ) sleep_ulpwu( )<br />

setup_zdc()<br />

zcd_status()<br />

abs( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

value = abs(x)<br />

x is a signed 8, 16, or 32 bit int or a float<br />

Same type as the parameter.<br />

Computes the absolute value of a number.<br />

All devices<br />

#INCLUDE <br />

signed int target,actual;<br />

...<br />

error = abs(target-actual);<br />

None<br />

155

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

Saved successfully!

Ooh no, something went wrong!