跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

How can the Autocomplete function help me with Synergy code development?

Last Updated:12/20/2017

Question:

What is the Autocomplete function and how can it help me with my code development tasks?

Answer:

The autocomplete function provides information, options and suggestions for helping to write code as described below.

Autocomplete

To use the functions available within an SSP module the appropriate API must be selected. This can be done with any component by typing the name and then typing .p_api-> . For example, to access the API’s available with g_ioport, a developer would use g_ioport.p_api->.

e2 Studio has an autocomplete feature which will list all the API’s that are available within the component. A developer simply needs to press enter to autocomplete the API entry as shown in the below screen capture.

PinWrite_Auto_GIF.GIF

Once the API has been autocompleted, a developer still may need to pass arguments into the function call. The apparent problem is that the beautiful API prototype is now no longer shown. Another autocomplete feature that developers can use is control + space. Control + space will show the prototype for a function parameter or open the autocomplete dialog if a variable or macro has been partially typed. The prototype for pinWrite shows that two parameters are required- a pin location and a level as illustrated in the screen shot below.

PinWrite_Proto_GIF.GIF

Often an enumeration is available for parameters and by typing in just the first part, and then control + space, the available options are displayed. Simply double click the desired option or select it and press enter. These steps are illustrated in the below screen capture.

PinWrite_IOPORT_GIF.GIF

Suitable Products
SSP