%endfunction
-%function ArduinoCommonBlockTypeSetup(block, system) void
+%function RppCommonBlockTypeSetup(block, system) void
%if EXISTS("_DONE_COMMON_BLOCK_TYPE_SETUP_") == 0
%assign _DONE_COMMON_BLOCK_TYPE_SETUP_ = 1
%if !SLibCodeGenForSim()
- %%<LibAddToCommonIncludes("common.h")>
- %%<LibAddToCommonIncludes("anothercommon.h")>
+ %<LibAddToCommonIncludes("rpp.h")>
%endif
%endif
%endfunction
+
+
+%function RppCommonStart(block, system) void
+
+ %if EXISTS("_DONE_COMMON_START_") == 0
+ %assign _DONE_COMMON_START_ = 1
+
+ %if !SLibCodeGenForSim()
+
+ /* Initialize RPP board */
+ rpp_init();
+
+ %endif
+ %endif
+
+%endfunction
+
%function BlockTypeSetup(block, system) void
%% Ensure required header files are included
- %%<LibAddToCommonIncludes("somegpioheader.h")>
+ %<RppCommonBlockTypeSetup(block, system)>
%endfunction
%function Start(block, system) Output
%if !SLibCodeGenForSim()
- /* %<Type> (%<ParamSettings.FunctionName>): %<Name> */
- dmmInit();
- gioInit();
- %assign p1_val = LibBlockParameter(p1, "", "", 0)
- //pinMode(%<p1_val>, OUTPUT);
+ %%/* %<Type> (%<ParamSettings.FunctionName>): %<Name> */
+ %<RppCommonStart(block, system)>
+ %%assign p1_val = LibBlockParameter(p1, "", "", 0)
+ %%//pinMode(%<p1_val>, OUTPUT);
%endif
%endfunction