Nut/OS  4.10.3
API Reference
PHAT16 Support

PHAT16 specific routines. More...

Collaboration diagram for PHAT16 Support:

Defines

#define PHAT16CMASK   0xFFFF

Functions

int Phat16GetClusterLink (NUTDEVICE *dev, uint32_t clust, uint32_t *link)
 Get link value of a specified cluster.
int Phat16SetClusterLink (NUTDEVICE *dev, uint32_t clust, uint32_t link)
 Set link value of a specified cluster.
int Phat16ReleaseChain (NUTDEVICE *dev, uint32_t first)
 Release a cluster chain.

Detailed Description

PHAT16 specific routines.


Define Documentation

#define PHAT16CMASK   0xFFFF

Function Documentation

int Phat16GetClusterLink ( NUTDEVICE dev,
uint32_t  clust,
uint32_t link 
)

Get link value of a specified cluster.

Parameters:
devSpecifies the file system device.
clustGet the link of this cluster.
linkPointer to a variable which will receive the link.
Returns:
0 on success or -1 on failure.

Definition at line 103 of file phat16.c.

References _NUTDEVICE::dev_dcb, PHAT16CMASK, PHATEOC, PhatSectorLoad(), _PHATSECTBUF::sect_data, and _PHATVOL::vol_buf.

Referenced by Phat16ReleaseChain(), PhatFilePosSet(), PhatFileRead(), and PhatFileWrite().

Here is the call graph for this function:

int Phat16SetClusterLink ( NUTDEVICE dev,
uint32_t  clust,
uint32_t  link 
)

Set link value of a specified cluster.

Parameters:
devSpecifies the file system device.
clustThis cluster will be linked.
linkLink to this cluster.
Returns:
0 on success or -1 on failure.

Definition at line 137 of file phat16.c.

References _NUTDEVICE::dev_dcb, PhatSectorLoad(), _PHATSECTBUF::sect_data, _PHATSECTBUF::sect_dirty, _PHATVOL::vol_buf, and _PHATVOL::vol_tab_sect.

Referenced by AllocFirstCluster(), and Phat16ReleaseChain().

Here is the call graph for this function:

int Phat16ReleaseChain ( NUTDEVICE dev,
uint32_t  first 
)

Release a cluster chain.

Parameters:
devSpecifies the file system device.
firstFirst cluster of the chain to release.
Returns:
0 on success or -1 on failure.

Definition at line 165 of file phat16.c.

References _NUTDEVICE::dev_dcb, PHAT16CMASK, Phat16GetClusterLink(), Phat16SetClusterLink(), PHATEOC, and _PHATVOL::vol_numfree.

Referenced by PhatDirReleaseChain().

Here is the call graph for this function: