This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Fork of libMiMic by
core/NyLPC_cMiMicEnv.c@115:fa79286d8ea4, 2017-02-24 (annotated)
- Committer:
- furutani
- Date:
- Fri Feb 24 04:43:41 2017 +0000
- Revision:
- 115:fa79286d8ea4
- Parent:
- 113:e40058804062
Delete missing include line.; Add parameter "timeout" to TCPSocket::connect(), precv().; Fix to send ARP request to default gateway when connecting to IP address of different segment.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nyatla | 69:8c5f220441f5 | 1 | #include "NyLPC_cMiMicEnv.h" |
nyatla | 109:18f12ac01097 | 2 | #include "NyLPC_netif.h" |
nyatla | 69:8c5f220441f5 | 3 | |
nyatla | 113:e40058804062 | 4 | const static char* VERSION="MiMic/1.7.2"; |
nyatla | 70:2ed02b798004 | 5 | |
nyatla | 70:2ed02b798004 | 6 | #if NyLPC_MCU==NyLPC_MCU_LPC4088 |
nyatla | 70:2ed02b798004 | 7 | const static char* MCU="LPC4088"; |
nyatla | 93:6afc7c06037f | 8 | static const char* PNAME_LPCXPRESSO="LPCXpresso"; |
nyatla | 93:6afc7c06037f | 9 | static const char* PNAME_MBED="mbed"; |
nyatla | 70:2ed02b798004 | 10 | #elif NyLPC_MCU==NyLPC_MCU_LPC17xx |
nyatla | 69:8c5f220441f5 | 11 | const static char* MCU="LPC176x"; |
nyatla | 93:6afc7c06037f | 12 | static const char* PNAME_LPCXPRESSO="LPCXpresso"; |
nyatla | 93:6afc7c06037f | 13 | static const char* PNAME_MBED="mbed"; |
nyatla | 91:db8279c869d3 | 14 | #elif NyLPC_MCU==NyLPC_MCU_K64F |
nyatla | 91:db8279c869d3 | 15 | const static char* MCU="K64F"; |
nyatla | 93:6afc7c06037f | 16 | static const char* PNAME_FRDM="FRDM"; |
nyatla | 70:2ed02b798004 | 17 | #endif |
nyatla | 70:2ed02b798004 | 18 | |
nyatla | 69:8c5f220441f5 | 19 | const static char* UNKNOWN="UNKNOWN"; |
nyatla | 69:8c5f220441f5 | 20 | |
nyatla | 69:8c5f220441f5 | 21 | |
nyatla | 69:8c5f220441f5 | 22 | |
nyatla | 69:8c5f220441f5 | 23 | |
nyatla | 69:8c5f220441f5 | 24 | |
nyatla | 69:8c5f220441f5 | 25 | const char* NyLPC_cMiMicEnv_getStrProperty(NyLPC_TUInt16 i_id) |
nyatla | 69:8c5f220441f5 | 26 | { |
nyatla | 69:8c5f220441f5 | 27 | switch(i_id){ |
nyatla | 69:8c5f220441f5 | 28 | case NyLPC_cMiMicEnv_VERSION: |
nyatla | 69:8c5f220441f5 | 29 | return VERSION; |
nyatla | 69:8c5f220441f5 | 30 | case NyLPC_cMiMicEnv_SHORT_NAME: |
nyatla | 93:6afc7c06037f | 31 | #if NyLPC_MCU==NyLPC_MCU_K64F |
nyatla | 93:6afc7c06037f | 32 | return PNAME_FRDM; |
nyatla | 93:6afc7c06037f | 33 | #else |
nyatla | 110:257739f9b31e | 34 | switch(*(NyLPC_cNet_getInterfaceInfo()->device_name)){ |
nyatla | 69:8c5f220441f5 | 35 | case 'L': |
nyatla | 70:2ed02b798004 | 36 | return PNAME_LPCXPRESSO; |
nyatla | 69:8c5f220441f5 | 37 | case 'D': |
nyatla | 69:8c5f220441f5 | 38 | return PNAME_MBED; |
nyatla | 69:8c5f220441f5 | 39 | default: |
nyatla | 69:8c5f220441f5 | 40 | return UNKNOWN; |
nyatla | 69:8c5f220441f5 | 41 | } |
nyatla | 93:6afc7c06037f | 42 | #endif |
nyatla | 69:8c5f220441f5 | 43 | case NyLPC_cMiMicEnv_ETHERNET_PHY: |
nyatla | 110:257739f9b31e | 44 | return NyLPC_cNet_getInterfaceInfo()->device_name; |
nyatla | 69:8c5f220441f5 | 45 | case NyLPC_cMiMicEnv_MCU_NAME: |
nyatla | 69:8c5f220441f5 | 46 | return MCU; |
nyatla | 69:8c5f220441f5 | 47 | default: |
nyatla | 69:8c5f220441f5 | 48 | return UNKNOWN; |
nyatla | 69:8c5f220441f5 | 49 | } |
nyatla | 69:8c5f220441f5 | 50 | } |