Skip to content

Instantly share code, notes, and snippets.

@vmlemon
Created May 12, 2014 19:54
Show Gist options
  • Save vmlemon/f0cd401165dcc9ed8cd9 to your computer and use it in GitHub Desktop.
Save vmlemon/f0cd401165dcc9ed8cd9 to your computer and use it in GitHub Desktop.
int reg_pio_data_in_lba28( unsigned char dev, // device (0 or 1)
unsigned char cmd, // command register
int fr, // feature register
int sc, // sector count
long lba, // LBA
unsigned char * bufAddr, // buffer address
int numSect, // number of sectors to transfer
int multiCnt ); // current multiple count
Execute an ATA PIO Data In command in LBA sector addressing
mode.
numSect is the actual number of sectors to be transferred.
This value may be different than the sc value.
If cmd is C4H (Read Multiple) then multiCnt MUST be set to the
current sectors per block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment