OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [or1ksim/] [peripheral/] [atadevice-cmdi.c] - Diff between revs 19 and 82

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 19 Rev 82
Line 121... Line 121...
 
 
  /* set the file-positon pointer to the start of the sector    */
  /* set the file-positon pointer to the start of the sector    */
  fseek (dev->conf.stream, dev->internals.lba, SEEK_SET);
  fseek (dev->conf.stream, dev->internals.lba, SEEK_SET);
 
 
  /* get the bytes from the stream                              */
  /* get the bytes from the stream                              */
  fread (dev->internals.dbuf, BYTES_PER_SECTOR, 1, dev->conf.stream);
  if (1 != fread (dev->internals.dbuf, BYTES_PER_SECTOR, 1, dev->conf.stream))
 
    {
 
      printf ("WARNING atadevice read short\n");
 
    }
 
 
  /* set status register bits                                   */
  /* set status register bits                                   */
  dev->regs.status = ATA_SR_DRDY | ATA_SR_DRQ;
  dev->regs.status = ATA_SR_DRDY | ATA_SR_DRQ;
 
 
  /* reset the databuffer                                       */
  /* reset the databuffer                                       */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.