OSDN Git Service

6409697e1593577b69211a93dc16a2079f110fe8
[mimic/MiMicSDK.git] / lib / src / NyLPC_cMiMicEnv.c
1 #include "NyLPC_cMiMicEnv.h"\r
2 #include "../uip/NyLPC_cUipService_protected.h"\r
3 \r
4 const static char* VERSION="MiMic/1.5.7";\r
5 \r
6 #if NyLPC_MCU==NyLPC_MCU_LPC4088\r
7 const static char* MCU="LPC4088";\r
8 #elif NyLPC_MCU==NyLPC_MCU_LPC17xx\r
9 const static char* MCU="LPC176x";\r
10 #endif\r
11 \r
12 const static char* UNKNOWN="UNKNOWN";\r
13 \r
14 \r
15 static const char* PNAME_LPCXPRESSO="LPCXpresso";\r
16 static const char* PNAME_MBED="mbed";\r
17 \r
18 \r
19 \r
20 const char* NyLPC_cMiMicEnv_getStrProperty(NyLPC_TUInt16 i_id)\r
21 {\r
22     switch(i_id){\r
23     case NyLPC_cMiMicEnv_VERSION:\r
24         return VERSION;\r
25     case NyLPC_cMiMicEnv_SHORT_NAME:\r
26         switch(*(NyLPC_cUipService_refDeviceName())){\r
27         case 'L':\r
28             return PNAME_LPCXPRESSO;\r
29         case 'D':\r
30             return PNAME_MBED;\r
31         default:\r
32             return UNKNOWN;\r
33         }\r
34     case NyLPC_cMiMicEnv_ETHERNET_PHY:\r
35         return NyLPC_cUipService_refDeviceName();\r
36     case NyLPC_cMiMicEnv_MCU_NAME:\r
37         return MCU;\r
38     default:\r
39         return UNKNOWN;\r
40     }\r
41 }\r