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

Parameters:<br />

Options- The mode of the QEI module. See the devices .h file for all<br />

options<br />

Some common options are:<br />

· QEI_MODE_X2<br />

· QEI_MODE_X4<br />

filter - This parameter is optional, the user can enable the digital filters<br />

and specify the clock divisor.<br />

maxcount - Specifies the value at which to reset the position counter.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

void<br />

Configures the Quadrature Encoder Interface. Various settings<br />

like mode and filters can be setup.<br />

Devices that have the QEI module.<br />

Nothing.<br />

setup_qei(QEI_MODE_X2|QEI_RESET_WHEN_MAXCOUNT,<br />

QEI_FILTER_ENABLE_QEA|QEI_FILTER_DIV_2,0x1000);<br />

None<br />

qei_set_count() , qei_get_count() , qei_status()<br />

setup_rtc( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

setup_rtc() (options, calibration);<br />

Options- The mode of the RTCC module. See the devices .h file for all options<br />

Calibration- This parameter is optional and the user can specify an 8 bit value<br />

that will get written to the calibration configuration register.<br />

void<br />

Configures the Real Time Clock and Calendar module. The module requires<br />

an external 32.768 kHz clock crystal for operation.<br />

Devices that have the RTCC module.<br />

Nothing.<br />

299

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

Saved successfully!

Ooh no, something went wrong!