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

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

This function prints out to STDERR the supplied string and a description of the<br />

last system error (usually a math error).<br />

All devices.<br />

#USE RS232, #INCLUDE <br />

x = sin(y);<br />

if(errno!=0)<br />

perror("Problem in find_area");<br />

None<br />

RS232 I/O Overview<br />

port_x_pullups ( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

port_a_pullups (value)<br />

port_b_pullups (value)<br />

port_d_pullups (value)<br />

port_e_pullups (value)<br />

port_j_pullups (value)<br />

port_x_pullups (upmask)<br />

port_x_pullups (upmask, downmask)<br />

value is TRUE or FALSE on most parts, some parts that allow pullups to<br />

be specified on individual pins permit an 8 bit int here, one bit for each<br />

port pin.<br />

upmask for ports that permit pullups to be specified on a pin basis. This<br />

mask indicates what pins should have pullups activated. A 1 indicates the<br />

pullups is on.<br />

downmask for ports that permit pulldowns to be specified on a pin basis.<br />

This mask indicates what pins should have pulldowns activated. A 1<br />

indicates the pulldowns is on.<br />

undefined<br />

Sets the input pullups. TRUE will activate, and a FALSE will deactivate.<br />

Only 14 and 16 bit devices (<strong>PCM</strong> and <strong>PCH</strong>). (Note: use<br />

SETUP_COUNTERS on <strong>PCB</strong> parts).<br />

Nothing<br />

port_a_pullups(FALSE);<br />

ex_lcdkb.c, kbd.c<br />

231

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

Saved successfully!

Ooh no, something went wrong!