-%% Copyright (C) 2013-2014 Czech Technical University in Prague
+%% Copyright (C) 2013-2015 Czech Technical University in Prague
%%
%% Authors:
%% - Carlos Jenkins <carlos@jenkins.co.cr>
%openfile tmpBuf
/* Definitions */
- #define STEP_SIZE_MILLIS %<CompiledModel.FundamentalStepSize>*1000.0
+ #define STEP_SIZE_MILLIS (%<CompiledModel.FundamentalStepSize>*1000.0)
#define CONTROL_PRIORITY 3
#define WORKING_PRIORITY 2
#define EXTMODE_PRIORITY 1
/* Overrun detected */
overrun_flag = TRUE;
} else {
- overrun_flag = FALSE;
/* Release semaphore */
xSemaphoreGive(step_signal);
}
{
/* Initialize model */
%<LibCallModelInitialize()>\
-
+ /* Step the model for any subrate */
xSemaphoreGive(initialized_signal);
while (1) {
-
- /* Lock semaphore */
if (xSemaphoreTake(step_signal, portMAX_DELAY)) {
working = TRUE;
%<LibCallModelStep(0)>\
%if EXISTS(::rpp_ain_present)
rpp_adc_init();
%endif
- %if EXISTS(::rpp_din_present) || EXISTS(::rpp_dout_present)
+ %if EXISTS(::rpp_aout_present)
+ rpp_dac_init();
+ %endif
+ %if EXISTS(::rpp_din_present)
+ rpp_din_init();
+ %endif
+ %if EXISTS(::rpp_hbr_present)
+ rpp_hbr_init();
+ %endif
+ %if EXISTS(::rpp_irc_present)
+ rpp_irc_init();
+ %endif
+ %if EXISTS(::rpp_lout_present)
+ rpp_lout_init();
+ %endif
+ %if EXISTS(::rpp_mout_present)
+ rpp_mout_init();
+ %endif
+ %if EXISTS(::rpp_sdr_present)
+ rpp_sdr_init();
+ %endif
+ %if EXISTS(::rpp_gio_in_present) || EXISTS(::rpp_gio_out_present)
rpp_gio_init(RPP_GIO_PORT_ALL);
%endif
rpp_sci_init();