X-Git-Url: http://git.osdn.net/view?p=mimic%2FMiMicSDK.git;a=blobdiff_plain;f=lib%2Fsrc%2Fdriver%2Fethernet%2FNyLPC_IEthernetDevice.h;fp=lib%2Fsrc%2Fdriver%2Fethernet%2FNyLPC_IEthernetDevice.h;h=09577cae7554c6d2060dce6a875a460fe9282c70;hp=b965a4c84dc452606c1f5a386326dcd022e7b547;hb=6f577ed92e46bc8bf0463a7330ff698ec75853f2;hpb=46823da6b6b38411dd4dc824f9ec8deeb1134d74 diff --git a/lib/src/driver/ethernet/NyLPC_IEthernetDevice.h b/lib/src/driver/ethernet/NyLPC_IEthernetDevice.h index b965a4c..09577ca 100644 --- a/lib/src/driver/ethernet/NyLPC_IEthernetDevice.h +++ b/lib/src/driver/ethernet/NyLPC_IEthernetDevice.h @@ -1,18 +1,21 @@ /* * NyLPC_IEthernetDevice.h * - * Created on: 2011/12/06 + * Created: 2011/12/06 * MiMicのイーサネットドライバインタフェイスを定義する。 */ #ifndef NyLPC_IEthernetDevice_h #define NyLPC_IEthernetDevice_h #include "NyLPC_stdlib.h" -#include "NyLPC_uipService.h" +#include "../../netif/NyLPC_NetIf_ip_types.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ + + typedef struct NyLPC_TiEthernetDevice NyLPC_TiEthernetDevice_t; /**非同期イベントのメッセージタイプ*/ @@ -29,24 +32,6 @@ typedef unsigned int NyLPC_TiEthernetDevice_EVENT; typedef void (*NyLPC_TiEthernetDevice_onEvent)(void* i_param,NyLPC_TiEthernetDevice_EVENT i_type); -/** - * 送信バッフメモリのヘッダ。 - * この構造体は、TXバッファメモリブロックのヘッダーです。 - * TXバッファメモリブロックは、この構造体の後ろに、sizeに一致したメモリを連結したもので表現します。 - *
- * buffer=[struct NyLPC_TTxBufferHeader][n]
- * 
- */ -struct NyLPC_TTxBufferHeader -{ - //メモリブロックの参照カウンタ。 - NyLPC_TInt8 ref; - //送信用にロックしたかを示すフラグ - NyLPC_TUInt8 is_lock; - //32ビット境界に合わせるためのパディング。 - NyLPC_TUInt16 padding; -}; - /** @@ -82,7 +67,7 @@ typedef void (*NyLPC_TiEthernetDevice_nextRxEthFrame)(void); * 割り当てたメモリブロックのヘッダ。 */ #define NyLPC_iEthernetDevice_allocTxBuf(i,h,s) (i)->allocTxBuf((h),(s)) -typedef struct NyLPC_TTxBufferHeader* (*NyLPC_TiEthernetDevice_allocTxBuf)(NyLPC_TUInt16 i_hint,NyLPC_TUInt16* o_size); +typedef void* (*NyLPC_TiEthernetDevice_allocTxBuf)(NyLPC_TUInt16 i_hint,NyLPC_TUInt16* o_size); /** @@ -90,7 +75,7 @@ typedef struct NyLPC_TTxBufferHeader* (*NyLPC_TiEthernetDevice_allocTxBuf)(NyLPC * 関数は、メモリブロックの参照カウンタを1減算する。 */ #define NyLPC_iEthernetDevice_releaseTxBuf(i,b) (i)->releaseTxBuf(b) -typedef void (*NyLPC_TiEthernetDevice_releaseTxBuf)(struct NyLPC_TTxBufferHeader* i_buf); +typedef void (*NyLPC_TiEthernetDevice_releaseTxBuf)(void* i_buf); @@ -99,12 +84,11 @@ typedef void (*NyLPC_TiEthernetDevice_releaseTxBuf)(struct NyLPC_TTxBufferHeader * @param i_buf * allocTxBufで得たメモリか、初期化したNyLPC_TTxBufferHeaderメモリブロックを指定する。 * 送信が終わるまでの間、メモリを開放してはならない。 - * #外部で確保したメモリについては、利用不能なケースがあるかもしれない。現在のMiMicでは、使用できることを前提としている。 * @oaram i_size * i_bufの後ろに連結されているデータメモリの長さ */ #define NyLPC_iEthernetDevice_sendTxEthFrame(i,b,s) (i)->sendTxEthFrame((b),(s)) -typedef void (*NyLPC_TiEthernetDevice_sendTxEthFrame)(struct NyLPC_TTxBufferHeader* i_buf,unsigned short i_size); +typedef void (*NyLPC_TiEthernetDevice_sendTxEthFrame)(void* i_buf,unsigned short i_size); /**