Crossware

Table of Contents        Previous topic       Next topic       

Code Creation Wizards->Inserting Code into your Normal Source Files

If you place the text cursor in one of your normal C source files (not xstdsys.c) and then open a wizard, the Insert Before Cursor option will be available.  If you select this option, when you click on the Insert button the configuration code will be inserted into this source file (immediately before the line on which the cursor is located), instead of into xstdsys.c.  

Also when you  select the Insert Before Cursor option the Set button becomes available.  If you click on Set, any configuration code is cleared from the list view but your selections in the graphical interface remain unchanged.  Now when you make any changes to your selections the configuration code created will be that required to make only these changes.  For instance if timer 0 was configured as enabled when you clicked on the Set button and you then uncheck the Enable item the code created will be that required to disable the timer.  If you click on Insert and rebuild and run your program, the timer will be disabled when execution reaches this inserted code.

The Set button therefore allows you to use the wizards to create application code to control peripherals as well as initialisation code.

You can also create application code by invoking the Code Creation Wizards from the source code context menu.  See Accessing Wizards using the Source Code Context Menu.