]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Add ethernet include and init to model
authorJakub NejedlĂ˝ <nejedjak@fel.cvut.cz>
Wed, 28 Aug 2019 09:06:58 +0000 (11:06 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Sun, 8 Sep 2019 23:57:48 +0000 (01:57 +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 38281e2a72c813625836bd1c3587d6158b90e659..cd3585e660f3861d12b42436a2a50ec09dfce86d 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);