#ifndef NyLPC_uipService_protected_H\r
#define NyLPC_uipService_protected_H\r
#include "NyLPC_cUipService.h"\r
-#include "../driver/uip/EthDev.h"\r
-#include "../driver/uip/EthDev_LPC17xx.h"\r
+#include "../driver/ethernet/EthDev.h"\r
\r
/**********************************************************************\r
*\r
extern "C" {\r
#endif /* __cplusplus */\r
\r
-#define NyLPC_TcUipService_SIZE_OF_REPLY_BUF 128\r
+//#define NyLPC_TcUipService_SIZE_OF_REPLY_BUF 128\r
+\r
\r
\r
struct NyLPC_TcUipService\r
/** (Ethernetメモリ排他制御用)*/\r
NyLPC_TcMutex_t _mutex;\r
const struct TiEthernetDevice* _ethif;\r
- /** ipタスクが使う小サイズ送信バッファ*/\r
- struct\r
- {\r
- struct NyLPC_TTxBufferHeader h;\r
- NyLPC_TUInt8 buf[NyLPC_TcUipService_SIZE_OF_REPLY_BUF];\r
- }stx;\r
};\r
\r
\r
* cTcpSocketからコールする関数\r
**********************************************************************/\r
\r
+/**\r
+ * NyLPC_cUipService_allocTxBufが返却するメモリサイズ。\r
+ *\r
+ */\r
+#define NyLPC_cUipService_SYS_TX_BUF_SIZE (64-sizeof(struct NyLPC_TEthernetIIHeader))\r
\r
\r
/**\r
void* NyLPC_cUipService_allocTxBuf(NyLPC_TUInt16 i_hint,NyLPC_TUInt16* o_size);\r
\r
/**\r
+ * システム用の小さな送信ペイロードメモリを返します。\r
+ * この関数は、リエントラントを許容します。\r
+ * 返却するメモリブロックのサイズが小さいこと、メモリが確実に返される点がNyLPC_cUipService_allocTxBufと異なります。\r
+ * この関数が返すメモリのサイズは、NyLPC_cUipService_SYS_TX_BUF_SIZEの値です。\r
+ * 関数を使用するコードでは開始時に1度だけNyLPC_cUipService_SYS_TX_BUF_SIZEの値を確認して下さい。\r
+ */\r
+void* NyLPC_cUipService_allocSysTxBuf(void);\r
+\r
+/**\r
* allocTxbufで確保したメモリを開放します。\r
*/\r
void* NyLPC_cUipService_releaseTxBuf(void* i_buf);\r