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 ) |
Arguments
The "C" label for this structure.
The set of interface functions (see below).
dev_privA placeholder for any device specific data for this channel.
controllerPointer to controller to which this disk channel is attached.
mbr_suppDoes this disk support partitioning.
max_part_numThe maximum number of partitions to be supported.
The interface from the hardware independent driver into the hardware
interface module is contained in the funs
table. This is defined by the DISK_FUNS
macro.
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:
Arguments
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.