OSDN Git Service

バージョン修正、MiMicEnvの修正
[mimic/MiMicSDK.git] / lib / src / NyLPC_cMiMicEnv.c
index d3f5a12..f48be63 100644 (file)
@@ -1 +1,35 @@
+#include "NyLPC_cMiMicEnv.h"\r
+#include "../uip/NyLPC_cUipService_protected.h"\r
 \r
+const static char* VERSION="MiMic/1.5.0";\r
+const static char* MCU="LPC176x";\r
+const static char* UNKNOWN="UNKNOWN";\r
+\r
+\r
+static const char* PNAME_LPCXPRESSO1769="LPCXpresso1769";\r
+static const char* PNAME_MBED="mbed";\r
+\r
+\r
+\r
+const char* NyLPC_cMiMicEnv_getStrProperty(NyLPC_TUInt16 i_id)\r
+{\r
+       switch(i_id){\r
+       case NyLPC_cMiMicEnv_VERSION:\r
+               return VERSION;\r
+       case NyLPC_cMiMicEnv_SHORT_NAME:\r
+           switch(*(NyLPC_cUipService_refDeviceName())){\r
+           case 'L':\r
+               return PNAME_LPCXPRESSO1769;\r
+           case 'D':\r
+               return PNAME_MBED;\r
+           default:\r
+                       return UNKNOWN;\r
+           }\r
+       case NyLPC_cMiMicEnv_ETHERNET_PHY:\r
+               return NyLPC_cUipService_refDeviceName();\r
+       case NyLPC_cMiMicEnv_MCU_NAME:\r
+               return MCU;\r
+       default:\r
+               return UNKNOWN;\r
+       }\r
+}\r