Each physical disk connected to a controller is represented by a disk channel. Each channel is defined with the following macro:
DISK_CHANNEL(l, funs, dev_priv, controller, mbr_supp, max_part_num )
The "C" label for this structure.
The set of interface functions (see below).
A placeholder for any device specific data for this channel.
Pointer to controller to which this disk channel is attached.
Does this disk support partitioning.
The maximum number of partitions to be supported.
The interface from the hardware independent driver into the hardware
interface module is contained in the
table. This is defined by the DISK_FUNS
If the space for the channel has been allocated elsewhere, the following macro may be used to initialise it:
DISK_CHANNEL_INIT(dc, funs, dev_priv, controller, disk_info, part_dev_tab, part_chan_tab, part_tab, mbr_supp, max_part_num )
The arguments are as for DISK_CHANNEL() except for the following:
The name of an object of type disk_channel. This object will be initialised by the macro.
The name of an object of type disk_info.
The name of an array of objects of type struct cyg_devtab_entry. The number of array members must equal max_part_num, plus one.
The name of an array of objects of type disk_channel. The number of array members must equal max_part_num.
The name of an array of objects of type cyg_disk_partition_t. The number of array members must equal max_part_num.