1 %% Copyright (C) 2013-2014 Czech Technical University in Prague
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.
11 %% File : sfunction_dinc.tlc
13 %% TLC file for inlining RPP digital input configuration block.
16 %% BlockTypeSetup() : rtw_tlc.pdf p. 277
17 %% Start() : rtw_tlc.pdf p. 279
18 %% Outputs() : rtw_tlc.pdf p. 281
21 %implements sfunction_dinc "C"
26 %% Function: BlockInstanceSetup ================================================
27 %function BlockInstanceSetup(block, system) void
28 %if EXISTS("rpp_dinc_in_model") == 0
29 %<LibAddToCommonIncludes("rpp/rpp.h")>
30 %assign ::rpp_dinc_in_model = 1
32 %<LibBlockReportError(block, "Only one Digital Input Configure block is allowed in the model.")>
34 %assign ::rpp_din_present=1
37 %% Function: BlockTypeSetup ====================================================
38 %function BlockTypeSetup(block, system) void
40 %% Ensure required header files are included
41 %<RppCommonBlockTypeSetup(block, system)>
46 %% Function: Start =============================================================
47 %function Start(block, system) Output
49 %if !SLibCodeGenForSim()
50 %assign ref_a = LibBlockParameterValue(p1, 0)
51 %assign ref_b = LibBlockParameterValue(p2, 1)
52 rpp_din_ref(%<ref_a>, %<ref_b>);