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

BUILT-IN FUNCTIONS<br />

The <strong>CCS</strong> compiler provides a lot of built-in functions to access and use the PIC microcontroller's<br />

peripherals. This makes it very easy for the users to configure and use the peripherals without<br />

going into in depth details of the registers associated with the functionality. The functions<br />

categorized by the peripherals associated with them are listed on the next page. Click on the<br />

function name to get a complete description and parameter and return value descriptions.<br />

RS232<br />

I/O<br />

SPI<br />

TWO<br />

WIRE<br />

I/O<br />

assert( ) getch( ) putc( )<br />

fgetc( ) getchar( ) putchar( )<br />

fgets( ) gets( ) puts( )<br />

fprintf( ) kbhit( ) setup_uart( )<br />

fputc( ) perror( ) set_uart_speed( )<br />

fputs( ) getc( ) printf( )<br />

setup_spi( ) spi_data_is_in( ) spi_read2( )<br />

setup_spi2( ) spi_data_is_in2( ) spi_write( )<br />

spi_xfer( ) spi_read( ) spi_write2( )<br />

DISCRETE<br />

I/O<br />

get_tris_x( ) output_X( ) output_drive( )<br />

input( ) output_bit( ) output_low( )<br />

input_state( ) input_change_x( ) output_toggle( )<br />

set_tris_x( ) output_float( ) set_pullup()<br />

input_x( ) output_high( ) a<br />

PARALLEL<br />

PORT<br />

psp_input_full( ) psp_output_full( ) a<br />

psp_overflow( )<br />

setup_psp(option, address_mask)<br />

I2C<br />

I/O<br />

i2c_isr_state( ) i2c_slaveaddr( ) i2c_write( )<br />

i2c_poll( ) i2c_start( ) i2c_speed( )<br />

i2c_read( ) i2c_stop( ) i2c_init( )<br />

PROCESSOR<br />

CONTROLS<br />

clear_interrupt( ) goto_address( ) reset_cpu( )<br />

disable_interrupts( ) interrupt_active( ) restart_cause( )<br />

enable_interrupts( ) jump_to_isr( ) setup_oscillator( )<br />

ext_int_edge( ) label_address( ) sleep( )<br />

getenv( ) read_bank( ) write_bank( )<br />

151

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

Saved successfully!

Ooh no, something went wrong!