]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blob - rpp/blocks/tlc_c/sfunction_scic.tlc
949bd2191bf92cb17d2d464e00a0ebd6676046e3
[pes-rpp/rpp-simulink.git] / rpp / blocks / tlc_c / sfunction_scic.tlc
1 %% Copyright (C) 2013-2014 Czech Technical University in Prague
2 %%
3 %% Authors:
4 %%     - Carlos Jenkins <carlos@jenkins.co.cr>
5 %%
6 %% This document contains proprietary information belonging to Czech
7 %% Technical University in Prague. Passing on and copying of this
8 %% document, and communication of its contents is not permitted
9 %% without prior written authorization.
10 %%
11 %% File : sfunction_scic.tlc
12 %% Abstract:
13 %%     TLC file for inlining RPP serial communication configure block.
14 %%
15 %% References:
16 %%     BlockTypeSetup() : refs/rtw_tlc.pdf p. 277
17 %%     Outputs()        : refs/rtw_tlc.pdf p. 281
18
19
20 %implements sfunction_scic "C"
21
22 %include "common.tlc"
23
24
25 %% Function: BlockInstanceSetup ================================================
26 %function BlockInstanceSetup(block, system) void
27     %if EXISTS("rpp_scic_in_model") == 0
28         %assign ::rpp_scic_in_model = 1
29         %<LibAddToCommonIncludes("rpp/rpp.h")>
30     %else
31         %<LibBlockReportError(block, "Only one Serial Configure block is allowed in the model.")>
32     %endif
33 %endfunction
34
35 %% Function: BlockTypeSetup ====================================================
36 %function BlockTypeSetup(block, system) void
37
38     %% Ensure required header files are included
39     %<RppCommonBlockTypeSetup(block, system)>
40     %assign ::rpp_sci_present=1
41
42 %endfunction
43
44
45 %% Function: Start =============================================================
46 %function Start(block, system) Output
47
48     %if !SLibCodeGenForSim()
49
50         %if extMode
51             %return
52         %endif
53
54         %assign p1_val = LibBlockParameterValue(p1, 0)
55         rpp_sci_setup(%<p1_val>);
56     %endif
57
58 %endfunction
59
60
61 %% [EOF]