This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Fork of libMiMic by Ryo Iizuka

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Tue Jun 24 09:37:24 2014 +0000
Parent:
78:8cdb8fc7eda8
Child:
80:b94c3dec9848
Commit message:
MiMic core r375???

Changed in this revision

core/NyLPC_cMiMicEnv.c Show annotated file Show diff for this revision Revisions of this file
core/include/NyLPC_config.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpd.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpd.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdConnection.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdConnection.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread.c Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread_protected.h Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_cUipService.c Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_cUipService.h Show annotated file Show diff for this revision Revisions of this file
mbed/jsonrpc/Target_LPC4088.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/core/NyLPC_cMiMicEnv.c	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/NyLPC_cMiMicEnv.c	Tue Jun 24 09:37:24 2014 +0000
@@ -1,7 +1,7 @@
 #include "NyLPC_cMiMicEnv.h"
 #include "../uip/NyLPC_cUipService_protected.h"
 
-const static char* VERSION="MiMic/1.5.6";
+const static char* VERSION="MiMic/1.5.7";
 
 #if NyLPC_MCU==NyLPC_MCU_LPC4088
 const static char* MCU="LPC4088";
--- a/core/include/NyLPC_config.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/include/NyLPC_config.h	Tue Jun 24 09:37:24 2014 +0000
@@ -120,6 +120,7 @@
 //デバック情報
 ////////////////////////////////////////////////////////////////////////////////////////////////
 
+#define NyLPC_cHttpdThread_SIZE_OF_THREAD_STACK 2048
 /*固有プラットフォーム設定はここに記述します。*/
 #undef NyLPC_ARCH
 #define NyLPC_ARCH NyLPC_ARCH_MBEDRTOS
--- a/core/net/httpd/NyLPC_cHttpd.c	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpd.c	Tue Jun 24 09:37:24 2014 +0000
@@ -8,7 +8,7 @@
     i_inst->_num_of_active_connection=0;
     NyLPC_cMutex_initialize(&i_inst->_mutex);
     NyLPC_cTcpListener_initialize(&(i_inst->_listener),i_port_number);
-    for(i=0;i<NyLPC_cNet_NUMBER_OF_THREAD;i++){
+    for(i=0;i<NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD;i++){
         NyLPC_cHttpdThread_initialize(&(i_inst->_thread[i]),i_inst,NyLPC_TcThread_PRIORITY_IDLE);
     }
 }
@@ -22,7 +22,7 @@
     int i;
     for(;;){
         //ターミネイト状態のタスクを検索
-        for(i=0;i<NyLPC_cNet_NUMBER_OF_THREAD;i++){
+        for(i=0;i<NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD;i++){
             NyLPC_cHttpdThread_start(&(i_inst->_thread[i]),&i_inst->_listener);
         }
         NyLPC_cThread_yield();
@@ -34,7 +34,7 @@
 NyLPC_TUInt16 NyLPC_cHttpd_incNumOfConnection(NyLPC_TcHttpd_t* i_inst)
 {
     i_inst->_num_of_active_connection++;
-    NyLPC_Assert(i_inst->_num_of_active_connection<=NyLPC_cNet_NUMBER_OF_THREAD);
+    NyLPC_Assert(i_inst->_num_of_active_connection<=NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD);
     return i_inst->_num_of_active_connection;
 }
 NyLPC_TUInt16 NyLPC_cHttpd_decNumOfConnection(NyLPC_TcHttpd_t* i_inst)
@@ -57,4 +57,4 @@
 void NyLPC_cHttpd_unlock(NyLPC_TcHttpd_t* i_inst)
 {
     NyLPC_cMutex_unlock(&i_inst->_mutex);
-}
\ No newline at end of file
+}
--- a/core/net/httpd/NyLPC_cHttpd.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpd.h	Tue Jun 24 09:37:24 2014 +0000
@@ -10,6 +10,25 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/**
+ * HTTPコネクションスレッドの数
+ */
+#ifndef NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD
+#   define NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD 3
+#endif
+
+/**
+ * 持続性接続を許可するコネクションの数
+ * NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD-1以下にしてください。
+ */
+#ifndef NyLPC_cHttpd_MAX_PERSISTENT_CONNECTION
+#   define NyLPC_cHttpd_MAX_PERSISTENT_CONNECTION (NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD-1)
+#endif
+
+
+
+
+
 #ifndef DEFINE_NyLPC_TcHttpdConnection_t
     typedef struct NyLPC_TcHttpdConnection NyLPC_TcHttpdConnection_t;
     #define DEFINE_NyLPC_TcHttpdConnection_t
@@ -17,7 +36,8 @@
 
 
 
-#define NyLPC_cNet_NUMBER_OF_THREAD 3
+
+
 typedef void (*NyLPC_TcHttpd_onRequest)(NyLPC_TcHttpdConnection_t* i_inst);
 
 /**
@@ -34,7 +54,7 @@
     }function;
     NyLPC_TcMutex_t _mutex;
     NyLPC_TcTcpListener_t _listener;
-    NyLPC_TcHttpdThread_t _thread[NyLPC_cNet_NUMBER_OF_THREAD];
+    NyLPC_TcHttpdThread_t _thread[NyLPC_cHttpd_NUMBER_OF_CONNECTION_THREAD];
     NyLPC_TInt16 _num_of_active_connection;
 };
 
--- a/core/net/httpd/NyLPC_cHttpdConnection.c	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpdConnection.c	Tue Jun 24 09:37:24 2014 +0000
@@ -7,7 +7,7 @@
 
 void NyLPC_cHttpdConnection_initialize(NyLPC_TcHttpdConnection_t* i_inst,NyLPC_TcHttpd_t* i_parent_httpd)
 {
-    NyLPC_cTcpSocket_initialize(&(i_inst->_socket),i_inst->_rxbuf,NyLPC_NyLPC_TcHttpdConnection_SIZE_OF_RX_BUF);
+    NyLPC_cTcpSocket_initialize(&(i_inst->_socket),i_inst->_rxbuf,NyLPC_cHttpdConnection_SIZE_OF_RX_BUF);
     NyLPC_cHttpRequestPrefixParser_initialize(&(i_inst->_pparser));
     i_inst->_parent_httpd=i_parent_httpd;
     i_inst->_res_status=NyLPC_cHttpdConnection_ResStatus_CLOSED;
--- a/core/net/httpd/NyLPC_cHttpdConnection.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpdConnection.h	Tue Jun 24 09:37:24 2014 +0000
@@ -20,9 +20,11 @@
 #endif
 
 
-/** 受信バッファのサイズ*/
-#define NyLPC_NyLPC_TcHttpdConnection_SIZE_OF_RX_BUF 512
-
+/** HTTPコネクションの受信バッファのサイズ
+ */
+#ifndef NyLPC_cHttpdConnection_SIZE_OF_RX_BUF
+#   define NyLPC_cHttpdConnection_SIZE_OF_RX_BUF 512
+#endif
 
 typedef NyLPC_TUInt8 NyLPC_TcHttpdConnection_Status;
 
@@ -67,7 +69,7 @@
     NyLPC_TUInt8 _connection_message_mode;//COnnection:closeをヘッダに書き込むかのフラグ
     NyLPC_TcHttpd_t* _parent_httpd; //NyLPC_cHttpd
     NyLPC_TcTcpSocket_t _socket;
-    NyLPC_TUInt8 _rxbuf[NyLPC_NyLPC_TcHttpdConnection_SIZE_OF_RX_BUF];
+    NyLPC_TUInt8 _rxbuf[NyLPC_cHttpdConnection_SIZE_OF_RX_BUF];
     NyLPC_TcHttpStream_t _in_stream;
     NyLPC_TcHttpRequestPrefixParser_t _pparser;
     union{
--- a/core/net/httpd/NyLPC_cHttpdThread.c	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread.c	Tue Jun 24 09:37:24 2014 +0000
@@ -3,14 +3,13 @@
 #include "NyLPC_cHttpdConnection_protected.h"
 #include "NyLPC_cHttpdThread_protected.h"
 
-#define LIMIT_OF_PERSISTENT_CONNECTION (NyLPC_cNet_NUMBER_OF_THREAD-1)
 
 static int server(void* p);
 
 void NyLPC_cHttpdThread_initialize(NyLPC_TcHttpdThread_t* i_inst,NyLPC_TcHttpd_t* i_parent,NyLPC_TInt32 i_prio)
 {
     NyLPC_cHttpdConnection_initialize(&(i_inst->_connection),i_parent);
-    NyLPC_cThread_initialize(&(i_inst->_super),NyLPC_TcHttpdThread_SIZE_OF_THREAD_STACK,i_prio);
+    NyLPC_cThread_initialize(&(i_inst->_super),NyLPC_cHttpdThread_SIZE_OF_THREAD_STACK,i_prio);
 }
 void NyLPC_cHttpdThread_finalize(NyLPC_TcHttpdThread_t* i_inst)
 {
@@ -57,7 +56,7 @@
             break;
         }
         //持続性接続の初期モードを設定
-        if(NyLPC_cHttpd_getNumOfConnection(inst->_parent_httpd)>LIMIT_OF_PERSISTENT_CONNECTION){
+        if(NyLPC_cHttpd_getNumOfConnection(inst->_parent_httpd)>NyLPC_cHttpd_MAX_PERSISTENT_CONNECTION){
             NyLPC_cHttpdConnection_setConnectionMode(inst,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
         }else{
             NyLPC_cHttpdConnection_setConnectionMode(inst,NyLPC_TcHttpdConnection_CONNECTION_MODE_CONTINUE);
--- a/core/net/httpd/NyLPC_cHttpdThread.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread.h	Tue Jun 24 09:37:24 2014 +0000
@@ -20,6 +20,10 @@
     #define DEFINE_NyLPC_TcHttpd_t
 #endif
 
+/** Httpdセッションスレッドのスタックサイズ*/
+#ifndef NyLPC_cHttpdThread_SIZE_OF_THREAD_STACK
+#   define NyLPC_cHttpdThread_SIZE_OF_THREAD_STACK 1024
+#endif
 
 typedef struct NyLPC_TcHttpdThread NyLPC_TcHttpdThread_t;
 /**
--- a/core/net/httpd/NyLPC_cHttpdThread_protected.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread_protected.h	Tue Jun 24 09:37:24 2014 +0000
@@ -20,8 +20,6 @@
     #define DEFINE_NyLPC_TcHttpd_t
 #endif
 
-/** Httpdセッションスレッドのスタックサイズ*/
-#define NyLPC_TcHttpdThread_SIZE_OF_THREAD_STACK 2048
 
 
 
--- a/core/uip/NyLPC_cUipService.c	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/uip/NyLPC_cUipService.c	Tue Jun 24 09:37:24 2014 +0000
@@ -139,7 +139,7 @@
 
     _NyLPC_TcUipService_inst=inst;
     //タスク起動
-    NyLPC_cThread_initialize(&th,NyLPC_TcUipService_config_STACK_SIZE,NyLPC_TcThread_PRIORITY_SERVICE);
+    NyLPC_cThread_initialize(&th,NyLPC_cUipService_config_STACK_SIZE,NyLPC_TcThread_PRIORITY_SERVICE);
     NyLPC_cThread_start(&th,uipTask,NULL);
     return NyLPC_TBool_TRUE;
 }
--- a/core/uip/NyLPC_cUipService.h	Mon Jun 23 04:45:57 2014 +0000
+++ b/core/uip/NyLPC_cUipService.h	Tue Jun 24 09:37:24 2014 +0000
@@ -86,9 +86,9 @@
  *  upnp 256+160(MIN)
  *  mbedのExportしたのをLPCXpressoでコンパイルするときは+192しないと落ちる。
  */
-#define NyLPC_TcUipService_config_STACK_SIZE (256+192+192)
-/** 登録できるリスナの最大数*/
-#define NyLPC_TcUipService_config_MAX_LISTENER 4
+#ifndef NyLPC_cUipService_config_STACK_SIZE
+#define NyLPC_cUipService_config_STACK_SIZE (256+192+192)
+#endif
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed/jsonrpc/Target_LPC4088.cpp	Tue Jun 24 09:37:24 2014 +0000
@@ -0,0 +1,153 @@
+/**
+ * @file
+ * LPC176xのターゲットテーブルです。
+ */
+#include "TargetTypes.h"
+#include "RpcHandlerBase.h"
+#ifdef TARGET_LPC4088
+namespace MiMic
+{
+
+#define NS_LPC_PIN_0	PINID_LPC
+#define NS_LPC_PIN_1	(NS_LPC_PIN_0+32)
+#define NS_LPC_PIN_2	(NS_LPC_PIN_1+32)
+#define NS_LPC_PIN_3	(NS_LPC_PIN_2+32)
+#define NS_LPC_PIN_4	(NS_LPC_PIN_3+32)
+#define NS_LPC_PIN_5	(NS_LPC_PIN_4+32)
+
+const static struct TPinNameMapItem pin_table[]={
+	{P0_0	,NS_LPC_PIN_0+0},	{P0_1	,NS_LPC_PIN_0+1},	{P0_2	,NS_LPC_PIN_0+2},	{P0_3	,NS_LPC_PIN_0+3},
+	{P0_4	,NS_LPC_PIN_0+4},	{P0_5	,NS_LPC_PIN_0+5},	{P0_6	,NS_LPC_PIN_0+6},	{P0_7	,NS_LPC_PIN_0+7},
+	{P0_8	,NS_LPC_PIN_0+8},	{P0_9	,NS_LPC_PIN_0+9},	{P0_10	,NS_LPC_PIN_0+10},	{P0_11	,NS_LPC_PIN_0+11},
+	{P0_12	,NS_LPC_PIN_0+12},	{P0_13	,NS_LPC_PIN_0+13},	{P0_14	,NS_LPC_PIN_0+14},	{P0_15	,NS_LPC_PIN_0+15},
+	{P0_16	,NS_LPC_PIN_0+16},	{P0_17	,NS_LPC_PIN_0+17},	{P0_18	,NS_LPC_PIN_0+18},	{P0_19	,NS_LPC_PIN_0+19},
+	{P0_20	,NS_LPC_PIN_0+20},	{P0_21	,NS_LPC_PIN_0+21},	{P0_22	,NS_LPC_PIN_0+22},	{P0_23	,NS_LPC_PIN_0+23},
+	{P0_24	,NS_LPC_PIN_0+24},	{P0_25	,NS_LPC_PIN_0+25},	{P0_26	,NS_LPC_PIN_0+26},	{P0_27	,NS_LPC_PIN_0+27},
+	{P0_28	,NS_LPC_PIN_0+28},	{P0_29	,NS_LPC_PIN_0+29},	{P0_30	,NS_LPC_PIN_0+30},	{P0_31	,NS_LPC_PIN_0+31},
+
+	{P1_0	,NS_LPC_PIN_1+0},	{P1_1	,NS_LPC_PIN_1+1},	{P1_2	,NS_LPC_PIN_1+2},	{P1_3	,NS_LPC_PIN_1+3},
+	{P1_4	,NS_LPC_PIN_1+4},	{P1_5	,NS_LPC_PIN_1+5},	{P1_6	,NS_LPC_PIN_1+6},	{P1_7	,NS_LPC_PIN_1+7},
+	{P1_8	,NS_LPC_PIN_1+8},	{P1_9	,NS_LPC_PIN_1+9},	{P1_10	,NS_LPC_PIN_1+10},	{P1_11	,NS_LPC_PIN_1+11},
+	{P1_12	,NS_LPC_PIN_1+12},	{P1_13	,NS_LPC_PIN_1+13},	{P1_14	,NS_LPC_PIN_1+14},	{P1_15	,NS_LPC_PIN_1+15},
+	{P1_16	,NS_LPC_PIN_1+16},	{P1_17	,NS_LPC_PIN_1+17},	{P1_18	,NS_LPC_PIN_1+18},	{P1_19	,NS_LPC_PIN_1+19},
+	{P1_20	,NS_LPC_PIN_1+20},	{P1_21	,NS_LPC_PIN_1+21},	{P1_22	,NS_LPC_PIN_1+22},	{P1_23	,NS_LPC_PIN_1+23},
+	{P1_24	,NS_LPC_PIN_1+24},	{P1_25	,NS_LPC_PIN_1+25},	{P1_26	,NS_LPC_PIN_1+26},	{P1_27	,NS_LPC_PIN_1+27},
+	{P1_28	,NS_LPC_PIN_1+28},	{P1_29	,NS_LPC_PIN_1+29},	{P1_30	,NS_LPC_PIN_1+30},	{P1_31	,NS_LPC_PIN_1+31},
+
+	{P2_0	,NS_LPC_PIN_2+0},	{P2_1	,NS_LPC_PIN_2+1},	{P2_2	,NS_LPC_PIN_2+2},	{P2_3	,NS_LPC_PIN_2+3},
+	{P2_4	,NS_LPC_PIN_2+4},	{P2_5	,NS_LPC_PIN_2+5},	{P2_6	,NS_LPC_PIN_2+6},	{P2_7	,NS_LPC_PIN_2+7},
+	{P2_8	,NS_LPC_PIN_2+8},	{P2_9	,NS_LPC_PIN_2+9},	{P2_10	,NS_LPC_PIN_2+10},	{P2_11	,NS_LPC_PIN_2+11},
+	{P2_12	,NS_LPC_PIN_2+12},	{P2_13	,NS_LPC_PIN_2+13},	{P2_14	,NS_LPC_PIN_2+14},	{P2_15	,NS_LPC_PIN_2+15},
+	{P2_16	,NS_LPC_PIN_2+16},	{P2_17	,NS_LPC_PIN_2+17},	{P2_18	,NS_LPC_PIN_2+18},	{P2_19	,NS_LPC_PIN_2+19},
+	{P2_20	,NS_LPC_PIN_2+20},	{P2_21	,NS_LPC_PIN_2+21},	{P2_22	,NS_LPC_PIN_2+22},	{P2_23	,NS_LPC_PIN_2+23},
+	{P2_24	,NS_LPC_PIN_2+24},	{P2_25	,NS_LPC_PIN_2+25},	{P2_26	,NS_LPC_PIN_2+26},	{P2_27	,NS_LPC_PIN_2+27},
+	{P2_28	,NS_LPC_PIN_2+28},	{P2_29	,NS_LPC_PIN_2+29},	{P2_30	,NS_LPC_PIN_2+30},	{P2_31	,NS_LPC_PIN_2+31},
+
+	{P3_0	,NS_LPC_PIN_2+0},	{P3_1	,NS_LPC_PIN_2+1},	{P3_2	,NS_LPC_PIN_2+2},	{P3_3	,NS_LPC_PIN_2+3},
+	{P3_4	,NS_LPC_PIN_2+4},	{P3_5	,NS_LPC_PIN_2+5},	{P3_6	,NS_LPC_PIN_2+6},	{P3_7	,NS_LPC_PIN_2+7},
+	{P3_8	,NS_LPC_PIN_2+8},	{P3_9	,NS_LPC_PIN_2+9},	{P3_10	,NS_LPC_PIN_2+10},	{P3_11	,NS_LPC_PIN_2+11},
+	{P3_12	,NS_LPC_PIN_2+12},	{P3_13	,NS_LPC_PIN_2+13},	{P3_14	,NS_LPC_PIN_2+14},	{P3_15	,NS_LPC_PIN_2+15},
+	{P3_16	,NS_LPC_PIN_2+16},	{P3_17	,NS_LPC_PIN_2+17},	{P3_18	,NS_LPC_PIN_2+18},	{P3_19	,NS_LPC_PIN_2+19},
+	{P3_20	,NS_LPC_PIN_2+20},	{P3_21	,NS_LPC_PIN_2+21},	{P3_22	,NS_LPC_PIN_2+22},	{P3_23	,NS_LPC_PIN_2+23},
+	{P3_24	,NS_LPC_PIN_2+24},	{P3_25	,NS_LPC_PIN_2+25},	{P3_26	,NS_LPC_PIN_2+26},	{P3_27	,NS_LPC_PIN_2+27},
+	{P3_28	,NS_LPC_PIN_2+28},	{P3_29	,NS_LPC_PIN_2+29},	{P3_30	,NS_LPC_PIN_2+30},	{P3_31	,NS_LPC_PIN_2+31},
+	
+	{P4_0	,NS_LPC_PIN_4+0},	{P4_1	,NS_LPC_PIN_4+1},	{P4_2	,NS_LPC_PIN_4+2},	{P4_3	,NS_LPC_PIN_4+3},
+	{P4_4	,NS_LPC_PIN_4+4},	{P4_5	,NS_LPC_PIN_4+5},	{P4_6	,NS_LPC_PIN_4+6},	{P4_7	,NS_LPC_PIN_4+7},
+	{P4_8	,NS_LPC_PIN_4+8},	{P4_9	,NS_LPC_PIN_4+9},	{P4_10	,NS_LPC_PIN_4+10},	{P4_11	,NS_LPC_PIN_4+11},
+	{P4_12	,NS_LPC_PIN_4+12},	{P4_13	,NS_LPC_PIN_4+13},	{P4_14	,NS_LPC_PIN_4+14},	{P4_15	,NS_LPC_PIN_4+15},
+	{P4_16	,NS_LPC_PIN_4+16},	{P4_17	,NS_LPC_PIN_4+17},	{P4_18	,NS_LPC_PIN_4+18},	{P4_19	,NS_LPC_PIN_4+19},
+	{P4_20	,NS_LPC_PIN_4+20},	{P4_21	,NS_LPC_PIN_4+21},	{P4_22	,NS_LPC_PIN_4+22},	{P4_23	,NS_LPC_PIN_4+23},
+	{P4_24	,NS_LPC_PIN_4+24},	{P4_25	,NS_LPC_PIN_4+25},	{P4_26	,NS_LPC_PIN_4+26},	{P4_27	,NS_LPC_PIN_4+27},
+	{P4_28	,NS_LPC_PIN_4+28},	{P4_29	,NS_LPC_PIN_4+29},	{P4_30	,NS_LPC_PIN_4+30},	{P4_31	,NS_LPC_PIN_4+31},
+
+	{P5_0	,NS_LPC_PIN_5+0},	{P5_1	,NS_LPC_PIN_5+1},	{P5_2	,NS_LPC_PIN_5+2},	{P5_3	,NS_LPC_PIN_5+3},
+	{P5_4	,NS_LPC_PIN_5+4},
+
+	// mbed DIP Pin Names
+    {P1_24,PINID_MBED_DIP+5},	{P1_23,PINID_MBED_DIP+6},	{P1_20,PINID_MBED_DIP+7},	{P0_21,PINID_MBED_DIP+8},
+	{P0_0,PINID_MBED_DIP+9},	{P0_1,PINID_MBED_DIP+10},	{P0_9,PINID_MBED_DIP+11},	{P0_8,PINID_MBED_DIP+12},
+	{P0_7,PINID_MBED_DIP+13},	{P0_6,PINID_MBED_DIP+14},	{P0_23,PINID_MBED_DIP+15},	{P0_24,PINID_MBED_DIP+16},
+	{P0_25,PINID_MBED_DIP+17},	{P0_26,PINID_MBED_DIP+18},	{P1_30,PINID_MBED_DIP+19},	{P1_31,PINID_MBED_DIP+20},
+
+	{P2_10,PINID_MBED_DIP+23},	{P1_12,PINID_MBED_DIP+24},	{P1_11,PINID_MBED_DIP+25},	{P1_7,PINID_MBED_DIP+26},
+	{P1_6,PINID_MBED_DIP+27},	{P1_5,PINID_MBED_DIP+28},	{P1_3,PINID_MBED_DIP+29},	{P1_2,PINID_MBED_DIP+30},
+	{P5_3,PINID_MBED_DIP+31},	{P5_2,PINID_MBED_DIP+32},	{P0_5,PINID_MBED_DIP+33},	{P0_4,PINID_MBED_DIP+34},
+	{P5_4,PINID_MBED_DIP+37},	{P5_1,PINID_MBED_DIP+38},	{P5_0,PINID_MBED_DIP+39},
+	
+		
+	// Other mbed Pin Names	
+
+	{P1_18	,PINID_OTHER_MBED_LEDx+0},	{P0_13	,PINID_OTHER_MBED_LEDx+1},	{P1_13	,PINID_OTHER_MBED_LEDx+2},	{P2_19	,PINID_OTHER_MBED_LEDx+3},
+
+	{P0_2,PINID_OTHER_MBED_USBx+0},{P0_3,PINID_OTHER_MBED_USBx+1},
+
+	// Arch Pro Pin Names
+	{p10,PINID_ARCH_PRO_Dx+0},	{p9,PINID_ARCH_PRO_Dx+1},	{p31,PINID_ARCH_PRO_Dx+2},	{p32,PINID_ARCH_PRO_Dx+3},
+	{p33,PINID_ARCH_PRO_Dx+4},	{p37,PINID_ARCH_PRO_Dx+5},	{p38,PINID_ARCH_PRO_Dx+6},	{p34,PINID_ARCH_PRO_Dx+7},
+	{p8,PINID_ARCH_PRO_Dx+8},	{p39,PINID_ARCH_PRO_Dx+9},	{p14,PINID_ARCH_PRO_Dx+10},	{p11,PINID_ARCH_PRO_Dx+11},
+	{p12,PINID_ARCH_PRO_Dx+12},	{p13,PINID_ARCH_PRO_Dx+13},	{p19,PINID_ARCH_PRO_Dx+14},	{p20,PINID_ARCH_PRO_Dx+15},
+
+	{P4_29	,PINID_ARCH_PRO_Dx+0},	{P4_28	,PINID_ARCH_PRO_Dx+1},	{P0_4	,PINID_ARCH_PRO_Dx+2},	{P0_5	,PINID_ARCH_PRO_Dx+3},
+	{P2_2	,PINID_ARCH_PRO_Dx+4},	{P2_3	,PINID_ARCH_PRO_Dx+5},	{P2_4	,PINID_ARCH_PRO_Dx+6},	{P2_5	,PINID_ARCH_PRO_Dx+7},
+	{P0_0	,PINID_ARCH_PRO_Dx+8},	{P0_1	,PINID_ARCH_PRO_Dx+9},	{P0_6	,PINID_ARCH_PRO_Dx+10},{P0_9	,PINID_ARCH_PRO_Dx+11},
+	{P0_8	,PINID_ARCH_PRO_Dx+12},{P0_7	,PINID_ARCH_PRO_Dx+13},{P0_27	,PINID_ARCH_PRO_Dx+14},{P0_28	,PINID_ARCH_PRO_Dx+15},
+	
+	{p15,PINID_ARCH_PRO_Ax+0},	{p16,PINID_ARCH_PRO_Ax+1},	{p17,PINID_ARCH_PRO_Ax+2},	{p18,PINID_ARCH_PRO_Ax+3},
+	{p19,PINID_ARCH_PRO_Ax+4},	{p20,PINID_ARCH_PRO_Ax+5},
+ 
+	{NC,PINID_NC}
+};
+
+#define NUMBER_OF_PINMODE 5
+const static struct TPinModeMapItem pinmode_table[]=
+{
+	{PullUp		,PINMODEID+0},
+	{PullDown	,PINMODEID+1},
+	{PullNone	,PINMODEID+2},
+	{OpenDrain	,PINMODEID+3},
+	{PullDefault,PINMODEID+1}
+};
+#define NUMBER_OF_PORT_NAME 6
+const static struct TPortNameMapItem portname_table[]=
+{
+	{Port0	,PORTID+0},
+	{Port1	,PORTID+1},
+	{Port2	,PORTID+2},
+	{Port3	,PORTID+3},
+	{Port4	,PORTID+4},
+	{Port5	,PORTID+5},
+};
+
+PinName RpcHandlerBase::pinId2PinName(unsigned int i_id)
+{
+	for(int i=0;pin_table[i].name!=NC;i++){
+		if(i_id==pin_table[i].id){
+			return pin_table[i].name;
+		}
+	}
+	return NC;
+}
+
+PinMode RpcHandlerBase::pinmodeId2PinMode(unsigned int i_id)
+{
+	for(int i=0;i<NUMBER_OF_PINMODE;i++){
+		if(i_id==pinmode_table[i].id){
+			return pinmode_table[i].mode;
+		}
+	}
+	return PullDefault;
+}
+PortName RpcHandlerBase::portId2PortName(unsigned int i_id)
+{
+	for(int i=0;i<NUMBER_OF_PORT_NAME;i++){
+		if(i_id==portname_table[i].id){
+			return portname_table[i].port;
+		}
+	}
+	return Port0;
+}
+
+}
+#endif
+