1e6865dcdSopenharmony_ci<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 2e6865dcdSopenharmony_ci<html lang="en"> 3e6865dcdSopenharmony_ci<head> 4e6865dcdSopenharmony_ci<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5e6865dcdSopenharmony_ci<meta http-equiv="Content-Style-Type" content="text/css"> 6e6865dcdSopenharmony_ci<link rel="up" title="FatFs" href="../00index_e.html"> 7e6865dcdSopenharmony_ci<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/dstat.html"> 8e6865dcdSopenharmony_ci<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default"> 9e6865dcdSopenharmony_ci<title>FatFs - disk_status</title> 10e6865dcdSopenharmony_ci</head> 11e6865dcdSopenharmony_ci 12e6865dcdSopenharmony_ci<body> 13e6865dcdSopenharmony_ci 14e6865dcdSopenharmony_ci<div class="para func"> 15e6865dcdSopenharmony_ci<h2>disk_status</h2> 16e6865dcdSopenharmony_ci<p>The disk_status function is called to inquire the current drive status.</p> 17e6865dcdSopenharmony_ci<pre> 18e6865dcdSopenharmony_ciDSTATUS disk_status ( 19e6865dcdSopenharmony_ci BYTE <span class="arg">pdrv</span> <span class="c">/* [IN] Physical drive number */</span> 20e6865dcdSopenharmony_ci); 21e6865dcdSopenharmony_ci</pre> 22e6865dcdSopenharmony_ci</div> 23e6865dcdSopenharmony_ci 24e6865dcdSopenharmony_ci<div class="para arg"> 25e6865dcdSopenharmony_ci<h4>Parameter</h4> 26e6865dcdSopenharmony_ci<dl class="par"> 27e6865dcdSopenharmony_ci<dt>pdrv</dt> 28e6865dcdSopenharmony_ci<dd>Physical drive number to identify the target device. Always zero in single drive system.</dd> 29e6865dcdSopenharmony_ci</dl> 30e6865dcdSopenharmony_ci</div> 31e6865dcdSopenharmony_ci 32e6865dcdSopenharmony_ci 33e6865dcdSopenharmony_ci<div class="para ret"> 34e6865dcdSopenharmony_ci<h4>Return Values</h4> 35e6865dcdSopenharmony_ci<p>The current drive status is returned in combination of status flags described below. FatFs refers only <tt>STA_NOINIT</tt> and <tt>STA_PROTECT</tt>.</p> 36e6865dcdSopenharmony_ci<dl class="ret"> 37e6865dcdSopenharmony_ci<dt>STA_NOINIT</dt> 38e6865dcdSopenharmony_ci<dd>Indicates that the device has not been initialized and not ready to work. This flag is set on system reset, media removal or failure of <a href="dinit.html"><tt>disk_initialize</tt></a> function. It is cleared on <tt>disk_initialize</tt> function succeeded. Any media change that occurs asynchronously must be captured and reflect it to the status flags, or auto-mount function will not work correctly. If the system does not support media change detection, application program needs to explicitly re-mount the volume with <tt>f_mount</tt> function after each media change.</dd> 39e6865dcdSopenharmony_ci<dt>STA_NODISK</dt> 40e6865dcdSopenharmony_ci<dd>Indicates that no medium in the drive. This is always cleared when the drive is non-removable class. Note that FatFs does not refer this flag.</dd> 41e6865dcdSopenharmony_ci<dt>STA_PROTECT</dt> 42e6865dcdSopenharmony_ci<dd>Indicates that the medium is write protected. This is always cleared when the drive has no write protect function. Not valid if <tt>STA_NODISK</tt> is set.</dd> 43e6865dcdSopenharmony_ci</dl> 44e6865dcdSopenharmony_ci</div> 45e6865dcdSopenharmony_ci 46e6865dcdSopenharmony_ci<p class="foot"><a href="../00index_e.html">Return</a></p> 47e6865dcdSopenharmony_ci</body> 48e6865dcdSopenharmony_ci</html> 49