]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Add ethernet include and init to model
authorJakub <nejedjak@fel.cvut.cz>
Wed, 28 Aug 2019 09:06:58 +0000 (11:06 +0200)
committerJakub <nejedjak@fel.cvut.cz>
Sun, 1 Sep 2019 19:41:13 +0000 (21:41 +0200)
Add necessary includes and init functions to main of model. All changes
are used only if model is compiled with extmode.

rpp/rpp/rpp_mrmain.tlc

index 36ddbc0453dc824b5b7162932b49d76480dbdbc8..ba40052b662261a668ee55c287b7504fccd3b9ad 100644 (file)
@@ -56,6 +56,7 @@
       /* External mode header file */
       #include "ext_work.h"
       #include <drv/sci.h>
+      #include <drv/emac.h>
     %endif
 
     %closefile tmpBuf
         %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);