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.

SPI_SAMPLE_AT_END, SPI_XMIT_L_TO_H<br />

Constants from each group may be or'ed together with |.<br />

Returns:<br />

Function:<br />

Also See:<br />

undefined<br />

Initializes the Serial Port Interface (SPI). This is used for 2 or 3 wire serial<br />

devices that follow a common clock/data protocol.<br />

spi_write(), spi_read(), spi_data_is_in(), SPI Overview<br />

setup_timer_A( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

setup_timer_A (mode);<br />

mode values may be:<br />

· TA_OFF, TA_INTERNAL, TA_EXT_H_TO_L, TA_EXT_L_TO_H<br />

· TA_DIV_1, TA_DIV_2, TA_DIV_4, TA_DIV_8, TA_DIV_16,<br />

TA_DIV_32,<br />

TA_DIV_64, TA_DIV_128, TA_DIV_256<br />

· constants from different groups may be or'ed together with |.<br />

undefined<br />

Function: sets up Timer A.<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

This function is only available on devices with Timer A hardware.<br />

Constants are defined in the device's .h file.<br />

setup_timer_A(TA_OFF);<br />

setup_timer_A(TA_INTERNAL | TA_DIV_256);<br />

setup_timer_A(TA_EXT_L_TO_H | TA_DIV_1);<br />

none<br />

get_timerA( ), set_timerA( ), TimerA Overview<br />

setup_timer_B( )<br />

Syntax:<br />

Parameters:<br />

setup_timer_B (mode);<br />

mode values may be:<br />

· TB_OFF, TB_INTERNAL, TB_EXT_H_TO_L, TB_EXT_L_TO_H<br />

· TB_DIV_1, TB_DIV_2, TB_DIV_4, TB_DIV_8, TB_DIV_16,<br />

302

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

Saved successfully!

Ooh no, something went wrong!