Appendix

Specification Related to Device Drivers to be Used as Reference

In this section, the specifications related to the device management functions or device drivers in the T-Kernel/SM that are not included in the latest specification of T-Kernel though described in the device management functions in the T-Kernel specification Ver.1.00.xx and for which implementation examples are available on the existing systems are described.

It is preferable to examine the description described in this section when the compatibility with the device related functions of the existing T-Kernel application system or the device drivers for the existing T-Kernel need to be considered.

Details and the latest information of the specification, and the operation method of its specification need to be confirmed separately.

Disk Kind for Device Attributes

In the definition of device attributes in the T-Kernel specification Ver.1.00.xx, the following disk kinds are defined:

/* disk kind*/
#define TDK_DISK_UNDEF  0x0010  /* miscellaneous disk */
#define TDK_DISK_RAM    0x0011  /* RAM disk (used as main memory) */
#define TDK_DISK_ROM    0x0012  /* ROM disk (used as main memory) */
#define TDK_DISK_FLA    0x0013  /* Flash ROM or other silicon disk */
#define TDK_DISK_FD     0x0014  /* Floppy disk */
#define TDK_DISK_HD     0x0015  /* hard disk */
#define TDK_DISK_CDROM  0x0016  /* CD-ROM */

Device Attribute Data

TDN_DISKINFO

Disk information

The definition of DiskFormat that is used in the attribute data in the device common attribute in the T-Kernel specification Ver.1.00.xx. DiskFormat is included in the data type DiskInfo that is used in the disk information (TDN_DISKINFO) in the attribute data.

typedef enum {
        DiskFmt_STD     = 0,            /* standard (HD, etc.) */
        DiskFmt_2DD     = 1,            /* 2DD 720KB */
        DiskFmt_2HD     = 2,            /* 2HD 1.44MB */
        DiskFmt_CDROM   = 4             /* CD-ROM 640MB */
} DiskFormat ;
TDN_DISPSPEC

Display Device Specification

The definition of DEV_SPEC that is used in the attribute data in the device common attribute in the T-Kernel specification Ver.1.00.xx. DEV_SPEC is a data type that is used in the display device specification (TDN_DISPSPEC) in the attribute data.

typedef struct {
        H       attr;           /* Device attributes */
        H       planes;         /* number of planes */
        H       pixbits;        /* pixel bits (boundary/valid) */
        H       hpixels;        /* horizontal pixels */
        H       vpixels;        /* vertical pixels */
        H       hres;           /* horizontal resolution */
        H       vres;           /* vertical resolution */
        H       color[4];       /* color information */
        H       resv[6];        /* reserved */
} DEV_SPEC;

Event Type of the Device Event Notification

The following event types are defined in the device event notification in the T-Kernel specification Ver.1.00.xx:

typedef enum tdevttyp {
        TDE_unknown     = 0,            /* undefined */
        TDE_MOUNT       = 0x01,         /* media insert */
        TDE_EJECT       = 0x02,         /* Eject media */
        TDE_ILLMOUNT    = 0x03,         /* illegal media insert */
        TDE_ILLEJECT    = 0x04,         /* illegal media eject */
        TDE_REMOUNT     = 0x05,         /* media reinsert */
        TDE_CARDBATLOW  = 0x06,         /* card battery alarm */
        TDE_CARDBATFAIL = 0x07,         /* card battery failure */
        TDE_REQEJECT    = 0x08,         /* media eject request */
        TDE_PDBUT       = 0x11,         /* PD button state change */
        TDE_PDMOVE      = 0x12,         /* PD position move */
        TDE_PDSTATE     = 0x13,         /* PD state change */
        TDE_PDEXT       = 0x14,         /* PD extended event */
        TDE_KEYDOWN     = 0x21,         /* key down */
        TDE_KEYUP       = 0x22,         /* key up */
        TDE_KEYMETA     = 0x23,         /* meta key state change */
        TDE_POWEROFF    = 0x31,         /* power switch off */
        TDE_POWERLOW    = 0x32,         /* low power alarm */
        TDE_POWERFAIL   = 0x33,         /* power failure */
        TDE_POWERSUS    = 0x34,         /* auto suspend */
        TDE_POWERUPTM   = 0x35,         /* clock update */
        TDE_CKPWON      = 0x41          /* autopower on notify */
} TDEvtTyp;