30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

244 CHAPTER 5. T-KERNEL/SM<br />

#define TDN_EVENT (-1) /* RW: event notification message buffer ID */<br />

#define TDN_DISKINFO (-2) /* R: disk information */<br />

#define TDN_DISPSPEC (-3) /* R: display device specification */<br />

RW: read (tk rea dev)/write (tk wri dev) enabled<br />

R: read (tk rea dev) only<br />

TDN EVENT: Event Notification Message Buffer ID<br />

Data type: ID<br />

The ID of the message buffer used for device event notification. Since the system default message<br />

buffer ID is passed in device registration, that ID is set as the initial setting when a driver is<br />

started.<br />

If 0 is set, device events are not notified.<br />

Device event notification is discussed later below.<br />

TDN DISKINFO: Disk Information<br />

Data type: DiskInfo<br />

typedef enum {<br />

DiskFmt_STD = 0, /* standard (HD, etc.) */<br />

DiskFmt_2DD = 1, /* 2DD 720KB */<br />

DiskFmt_2HD = 2, /* 2HD 1.44MB */<br />

DiskFmt_CDROM = 4, /* CD-ROM 640MB */<br />

} DiskFormat;<br />

typedef struct {<br />

DiskFormat format; /* format */<br />

UW protect:1; /* protected status */<br />

UW removable:1; /* removable */<br />

UW rsv:30; /* reserved (always 0) */<br />

W blocksize; /* block size in bytes */<br />

W blockcount; /* total block count */<br />

} DiskInfo;<br />

See the disk driver specification for details.<br />

TDN DISPSPEC: Display Device <strong>Specification</strong><br />

Data type: DEV SPEC<br />

typedef struct {<br />

H attr; /* device attributes */<br />

H planes; /* number of planes */<br />

H pixbits; /* pixel bits (boundary/valid) */<br />

H hpixels; /* horizontal pixels */<br />

H vpixels; /* vertical pixels */<br />

H hres; /* horizontal resolution */<br />

H vres; /* vertical resolution */<br />

H color[4]; /* color information */<br />

H resv[6]; /* reserved */<br />

} DEV_SPEC;<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!