![]() |
Functions | |
int | PhatSectorFlush (NUTDEVICE *dev, int bufnum) |
Flush sector buffers. | |
int | PhatSectorRead (NUTFILE *blkmnt, uint32_t sect, uint8_t *buf) |
Read sector. | |
int | PhatSectorLoad (NUTDEVICE *dev, uint32_t sect) |
int PhatSectorFlush | ( | NUTDEVICE * | dev, | |
int | bufnum | |||
) |
Flush sector buffers.
The volume must be locked before calling this function.
dev | Specifies the file system device. | |
bufnum | The buffer number to flush. If -1, all buffers are flushed. |
Definition at line 94 of file phatio.c.
References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_icb, EIO, errno, NUTBLKDEV_SEEK, BLKPAR_SEEK::par_blknum, BLKPAR_SEEK::par_nfp, PHATSECTBUF::sect_data, PHATSECTBUF::sect_dirty, PHATSECTBUF::sect_num, and PHATVOL::vol_buf.
Read sector.
The volume must be locked before calling this function.
blkmnt | Specifies the mounted block device partition. | |
sect | Sector to load. | |
buf | Points to a buffer which will receive the sector data. |
Definition at line 144 of file phatio.c.
References _NUTDEVICE::dev_ioctl, _NUTDEVICE::dev_read, EIO, errno, _NUTFILE::nf_dev, NUTBLKDEV_SEEK, BLKPAR_SEEK::par_blknum, and BLKPAR_SEEK::par_nfp.
Definition at line 169 of file phatio.c.
References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_icb, NutEventPostAsync(), NutEventWait(), PhatSectorFlush(), PhatSectorRead(), PHATSECTBUF::sect_data, PHATSECTBUF::sect_num, PHATVOL::vol_buf, and PHATVOL::vol_iomutex.