Source/drivers/block/xd.c
/* xd_build: put stuff into an array in a format suitable for the controller */
put stuff into an array in a format suitable for the controller
put stuff into an array in a format suitable for the controller
static u_char *xd_build (u_char *cmdblk,u_char command,u_char drive,u_char head,u_short cylinder,u_char sector,u_char count,u_char control)
{
	cmdblk[0] = command;
	cmdblk[1] = ((drive & 0x07) << 5) | (head & 0x1F);
	cmdblk[2] = ((cylinder & 0x300) >> 2) | (sector & 0x3F);
	cmdblk[3] = cylinder & 0xFF;
	cmdblk[4] = count;
	cmdblk[5] = control;
	return (cmdblk);
}
static u_char * xd_build ( u_char * cmdblk , u_char command , u_char drive , u_char head , u_short cylinder , u_char sector , u_char count , u_char control ) { cmdblk [ 0 ] = command ; cmdblk [ 1 ] = ( ( drive & 0x07 ) << 5 ) | ( head & 0x1F ) ; cmdblk [ 2 ] = ( ( cylinder & 0x300 ) >> 2 ) | ( sector & 0x3F ) ; cmdblk [ 3 ] = cylinder & 0xFF ; cmdblk [ 4 ] = count ; cmdblk [ 5 ] = control ; return ( cmdblk ) ; }
xd_build: put stuff into an array in a format suitable for the controller
xd_build : put stuff into an array in a format suitable for the controller