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

set_open_drain_c(value)<br />

set_open_drain_d(value)<br />

set_open_drain_e(value)<br />

set_open_drain_f(value)<br />

set_open_drain_g(value)<br />

set_open_drain_h(value)<br />

set_open_drain_j(value)<br />

set_open_drain_k(value)<br />

Parameters:<br />

Returns:<br />

Function<br />

Availability<br />

Examples:<br />

Example Files:<br />

value – is a bitmap corresponding to the pins of the port. Setting a bit<br />

causes the corresponding pin to act as an open-drain output.<br />

Nothing<br />

Enables/Disables open-drain output capability on port pins. Not all ports<br />

or port pins have open-drain capability, refer to devices datasheet for<br />

port and pin availability.<br />

On device that have open-drain capability.<br />

set_open_drain_b(0x0001); //enables open-drain output on<br />

PIN_B0, disable on all //other port B pins.<br />

None.<br />

set_power_pwm_override( )<br />

Syntax:<br />

set_power_pwm_override(pwm, override, value)<br />

Parameters: pwm is a constant between 0 and 7<br />

Override is true or false<br />

Value is 0 or 1<br />

Returns:<br />

Function:<br />

undefined<br />

pwm selects which module will be affected.<br />

Override determines whether the output is to be determined by the<br />

OVDCONS register or the PDC registers. When override is false, the<br />

PDC registers determine the output.<br />

When override is true, the output is determined by the value stored in<br />

OVDCONS.<br />

Availability:<br />

Requires:<br />

Examples:<br />

value determines if pin is driven to it's active staet or if pin will be inactive.<br />

I will be driven to its active state, 0 pin will be inactive.<br />

All devices equipped with PWM.<br />

None<br />

set_power_pwm_override(1, true, 1); //PWM1 will be<br />

271

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

Saved successfully!

Ooh no, something went wrong!