]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blobdiff - rpp/rpp/rpp_mrmain.tlc
Change license to MIT
[pes-rpp/rpp-simulink.git] / rpp / rpp / rpp_mrmain.tlc
index 38281e2a72c813625836bd1c3587d6158b90e659..8e2fb58d04bd87bce0116c52c05123601ccf0eb3 100644 (file)
@@ -5,10 +5,26 @@
 %%     - Michal Sojka <sojkam1@fel.cvut.cz>
 %%     - Michal Horn <hornmich@fel.cvut.cz>
 %%
-%% This document contains proprietary information belonging to Czech
-%% Technical University in Prague. Passing on and copying of this
-%% document, and communication of its contents is not permitted
-%% without prior written authorization.
+%% Permission is hereby granted, free of charge, to any person
+%% obtaining a copy of this software and associated documentation
+%% files (the "Software"), to deal in the Software without
+%% restriction, including without limitation the rights to use,
+%% copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the
+%% Software is furnished to do so, subject to the following
+%% conditions:
+
+%% The above copyright notice and this permission notice shall be
+%% included in all copies or substantial portions of the Software.
+
+%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+%% OTHER DEALINGS IN THE SOFTWARE.
 %%
 %% File : rpp_mrmain.tlc
 %% Abstract:
@@ -56,6 +72,7 @@
       /* External mode header file */
       #include "ext_work.h"
       #include <drv/sci.h>
+      #include <drv/emac.h>
     %endif
 
     %closefile tmpBuf
         void ext_mode_comm_task(void* p)
         {
             drv_sci_set_crlf_conv_en(FALSE); /* Disable CR->CRLF conversion */
+            rtParseArgsForExtMode(0, NULL);
 
             %<SLibGenERTExtModeInit()>
             xSemaphoreGive(ext_mode_ready);
         %endif
         rpp_sci_init();
 
+        %if extMode == 1
+            rpp_eth_init();
+        %endif
+        
         // Speed up the SCI
         rpp_sci_setup(115200);
 
             %assign model_info = SPRINTF("'%s' - %s (TLC %s)\\r\\n", LibGetMdlPubHdrBaseName(), TLC_TIME, TLC_VERSION)
             rpp_sci_printk("%<model_info>");
         %endif
-
         %if extMode == 1
           vSemaphoreCreateBinary(ext_mode_ready);
           xSemaphoreTake(ext_mode_ready, 0);
 
         %if extMode == 1
           /* External mode */
-          rtParseArgsForExtMode(0, NULL);
 
           if (xTaskCreate(ext_mode_comm_task, "ext_mode_comm_task", 1024, NULL, EXTMODE_PRIORITY, NULL) != pdPASS) {
             rpp_sci_printk("ERROR: Cannot spawn model task.\r\n");