close - Close CCS IDE files or RTDX™ channel

Syntax

close(cc,'filename','type')
close(rx,'channel1','channel2',...)
close(rx,'channel')

Description

close(cc,'filename','type') closes the file in CCS IDE identified by filename of type 'type'. type identifies the type of file to close. This can be either project files when you use 'project' for the type option, or text files when you use 'text' for the type option. To close a specific file in CCS IDE, filename must match exactly the name of the file to close. If you replace filename with 'all', close terminates every open file whose type matches the type option. File types recognized by close include these extensions.

type StringAffected files

'project'

Project files with the .pjt extension.

'text'

All files with these extensions —.a*, .c, .cc, .ccx, .cdb, .cmd, .cpp, .lib, .o*, .rcp, and .s*. Note that 'text' does not close .cfg files.

When you replace filename with the null entry [], close shuts the current active file window in CCS IDE. When you specify 'project' for the type option, it closes the active project.

close(rx,'channel1','channel2',...) closes the channels specified by the strings channel1, channel2, and so on as defined in rx.

close(rx,'channel') closes the specified channel. When you set channel to 'all', this function closes all the open channels associated with rx.

To avoid conflicts, do not name channels "all" or "ALL."

Examples

Using close with Files and Projects

To clarify the different close options, here are six commands that close open files or projects in CCS IDE.

CommandResult

close(cc,'all','project')

Close all open projects in CCS IDE.

close(cc,'my.pjt','project')

Close the project my.pjt.

close(cc,[],project')

Close the active project.

close(cc,'all','text')

Close all open text files. This includes source file, libraries, command files, and others.

close(cc,'my_source.cpp','text')

Close the text file my_source.cpp.

close(cc,[],'text')

Close the active file window.

Using close with RTDX™

When you plan to use RTDX to communicate with a target, you open and enable channels to the board and processor. For example, to communicate with the processor on your installed board, you use open to set up a channel, as follows:

cc = ticcs('boardnum',1,'procnum',0)
rx=cc.rtdx % Create an alias to the RTDX portion of this link.
open(rx,'ichan','w')  % Open a channel for write access.
enable(rx,'ichan')    % Enable the open channel for use.

After you finish using the open channel, you must close it to avoid difficulties later on.

close(rx,'ichan')

Or to close all open channels, you could use

close(rx,'all') 

See Also

disable, open

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS