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.

}<br />

Example<br />

Files:<br />

Also See:<br />

None<br />

setup_adc(), set_adc_channel(), setup_adc_ports(), read_adc(),<br />

ADC Overview<br />

assert( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

assert (condition);<br />

condition is any relational expression<br />

Nothing<br />

This function tests the condition and if FALSE will generate an error<br />

message on STDERR (by default the first USE RS232 in the<br />

program). The error message will include the file and line of the<br />

assert(). No code is generated for the assert() if you #define NODEBUG. In<br />

this way you may include asserts in your code for testing and quickly<br />

eliminate them from the final program.<br />

All devices<br />

assert.h and #USE RS232<br />

Examples:<br />

assert( number_of_entries= TABLE_SIZE then<br />

// the following is output at the RS232:<br />

// Assertion failed, file myfile.c, line 56<br />

Example<br />

Files:<br />

Also See:<br />

None<br />

#USE RS232, RS232 I/O Overview<br />

atoe<br />

Syntax:<br />

Parameters:<br />

atoe(string);<br />

string is a pointer to a null terminated string of<br />

characters.<br />

158

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

Saved successfully!

Ooh no, something went wrong!