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.

#separate<br />

Syntax:<br />

Elements:<br />

Purpose:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

#SEPARATE<br />

None<br />

Tells the compiler that the procedure IMMEDIATELY following the directive is<br />

to be implemented SEPARATELY. This is useful to prevent the compiler from<br />

automatically making a procedure INLINE. This will save ROM space but it<br />

does use more stack space. The compiler will make all procedures marked<br />

SEPARATE, separate, as requested, even if there is not enough stack space to<br />

execute.<br />

#separate<br />

swapbyte (int *a, int *b) {<br />

int t;<br />

t=*a;<br />

*a=*b;<br />

*b=t;<br />

}<br />

ex_cust.c<br />

#INLINE<br />

#serialize<br />

Syntax: #SERIALIZE(id=xxx, next="x" | file="filename.txt" " |<br />

listfile="filename.txt", "prompt="text", log="filename.txt") -<br />

or<br />

#SERIALIZE(dataee=x, binary=x, next="x" | file="filename.txt" |<br />

listfile="filename.txt", prompt="text", log="filename.txt")<br />

Elements:<br />

id=xxx - Specify a C CONST identifier, may be int8, int16, int32 or char<br />

array<br />

Use in place of id parameter, when storing serial number to EEPROM:<br />

dataee=x - The address x is the start address in the data EEPROM.<br />

binary=x - The integer x is the number of bytes to be written to address<br />

specified. -orstring=x<br />

- The integer x is the number of bytes to be written to address<br />

specified.<br />

Use only one of the next three options:<br />

file="filename.txt" - The file x is used to read the initial serial number<br />

from, and this file is updated by the ICD programmer. It is assumed this<br />

is a one line file with the serial number. The programmer will increment<br />

128

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

Saved successfully!

Ooh no, something went wrong!