Forráskód Böngészése

[portgw] change and correct define

balbekova 5 éve
szülő
commit
9f9cf2cf2f
2 módosított fájl, 16 hozzáadás és 0 törlés
  1. 13 0
      modules/portgw/portgw.c
  2. 3 0
      modules/portgw/portgw.h

+ 13 - 0
modules/portgw/portgw.c

@@ -13,6 +13,17 @@
 #include "portgw.h"
 #include "tinystdio.h"
 #include "usart.h"
+#ifdef PRINTF_STDLIB
+#include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
+
+#include <string.h>
+
+#ifdef PORTGW_ENABLE
+
 
 #define PORTGW_PORT_NUM         1001
 #define PORTGW_DATA_CHUNK_SIZE  512
@@ -630,3 +641,5 @@ void portgw_init(void)
     xTaskCreate(portgw_thread, ( char * ) "portgw_thr", configMINIMAL_STACK_SIZE * 2,
                 NULL, tskIDLE_PRIORITY, NULL);
 }
+
+#endif

+ 3 - 0
modules/portgw/portgw.h

@@ -8,7 +8,10 @@
 #ifndef PORTGW_H_
 #define PORTGW_H_
 
+#ifdef PORTGW_ENABLE
 
 void portgw_init(void);
 
+#endif
+
 #endif /* PORTGW_H_ */