GadgetSeed  0.9.6
st_device 構造体

デバイスドライバ構造体 [詳解]

#include <device.h>

st_device 連携図

フィールド

char name [MAX_DEVNAMELRN]
 デバイス名文字列
 
char explan [32]
 デバイス説明文字列
 
void * info
 デバイス情報データポインタ
 
void * private_data
 ドライバ固有データポインタ
 
struct st_mutexmutex
 デバイス排他アクセス用MUTEX
 
int(* register_dev )(struct st_device *dev, char *param)
 
int(* unregister_dev )(struct st_device *dev)
 
int(* lock )(struct st_device *dev, unsigned int timeout)
 
int(* unlock )(struct st_device *dev)
 
int(* open )(struct st_device *dev)
 
int(* close )(struct st_device *dev)
 
int(* read )(struct st_device *dev, void *buf, unsigned int count)
 
int(* getc )(struct st_device *dev, unsigned char *buf)
 
int(* write )(struct st_device *dev, const void *buf, unsigned int count)
 
int(* putc )(struct st_device *dev, unsigned char data)
 
int(* ioctl )(struct st_device *dev, unsigned int com, unsigned int arg, void *param)
 
int(* seek )(struct st_device *dev, int offset, int whence)
 
int(* block_read )(struct st_device *dev, void *buf, unsigned int sector, unsigned int blkcount)
 
int(* block_write )(struct st_device *dev, const void *buf, unsigned int sector, unsigned int blkcount)
 
int(* sync )(struct st_device *dev)
 
int(* select )(struct st_device *dev, unsigned int timeout)
 
int(* suspend )(struct st_device *dev)
 
int(* resume )(struct st_device *dev)
 

詳解

デバイスドライバ構造体

device.h25 行目に定義があります。


この構造体詳解は次のファイルから抽出されました: