1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_j.html">
<link rel="alternate" hreflang="en" title="English" href="../en/fdisk.html">
<link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs - f_fdisk</title>
</head>
<body>
<div class="para func">
<h2>f_fdisk</h2>
<p>�����h���C�u�����܂��B</p>
<pre>
FRESULT f_fdisk (
BYTE <span class="arg">pdrv</span>, <span class="c">/* [IN] �����h���C�u�ԍ� */</span>
const DWORD <span class="arg">part[]</span>, <span class="c">/* [IN] ���}�b�v�E�e�[�u�� */</span>
void* <span class="arg">work</span> <span class="c">/* [-] ���[�N�G���A */</span>
);
</pre>
</div>
<div class="para arg">
<h4>����</h4>
<dl class="par">
<dt>pdrv</dt>
<dd>��������<em>�����h���C�u</em>�̃h���C�u�ԍ����w�肵�܂��B</dd>
<dt>part[]</dt>
<dd>���}�b�v�E�e�[�u���ւ̃|�C���^���w�肵�܂��B</dd>
<dt>work</dt>
<dd>���[�N�G���A�ւ̃|�C���^���w�肵�܂��B�T�C�Y��<tt>_MAX_SS</tt>�o�C�g�K�v�ł��B</dd>
</dl>
</div>
<div class="para ret">
<h4>�߂�l</h4>
<p>
<a href="rc.html#ok">FR_OK</a>,
<a href="rc.html#de">FR_DISK_ERR</a>,
<a href="rc.html#nr">FR_NOT_READY</a>,
<a href="rc.html#wp">FR_WRITE_PROTECTED</a>,
<a href="rc.html#ip">FR_INVALID_PARAMETER</a>
</p>
</div>
<div class="para desc">
<h4>����</h4>
<p>���̊��́A�w�肳�ꂽ�����h���C�u��MBR�ɋ��e�[�u�����쐬���܂��B��敪���͈�ʓI��FDISK�`���ōs�����߁A�ő�4�̊�{�����쐬���邱�Ƃ��ł��܂��B�g�����ɂ͑Ή����Ă��܂���B���}�b�v�e�[�u��<tt class="arg">part[]</tt>�ɂ̓h���C�u���ǂ̂悤�ɕ������邩�w�肵�ēn���܂��B���̔z���4�̍��ڂ��琬��A�擪�̍��ڂ�1�Ԗڂ́A�Ō�̍��ڂ�4�Ԗڂ̋��̃T�C�Y�������܂��B�l��100�ȉ��̏ꍇ�A�h���C�u�̑��e�ʂɑ��銄�����p�[�Z���g�P�ʂŎw�肵�܂��B100����l�̏ꍇ�̓Z�N�^���̒��ڎw��ɂȂ�܂��B</p>
</div>
<div class="para comp">
<h4>�Ή����</h4>
<p><tt>_FS_READOLNY == 0</tt> �� <tt>_USE_MKFS == 1</tt> �� <tt>_MULTI_PARTITION == 1</tt> �̂Ƃ��g�p�\�ł��B</p>
</div>
<div class="para use">
<h4>�g�p��</h4>
<pre>
<span class="c">/* ���[�U��`�̃{�����[���Ǘ��e�[�u�� (_MULTI_PARTITION == 1 �̂Ƃ��K�v) */</span>
PARTITION VolToPart[] = {
{0, 1}, <span class="c">/* �_���h���C�u 0 ==> �����h���C�u 0, ��1��� */</span>
{0, 2}, <span class="c">/* �_���h���C�u 1 ==> �����h���C�u 0, ��2��� */</span>
{1, 0} <span class="c">/* �_���h���C�u 2 ==> �����h���C�u 1, �������o */</span>
};
</pre>
<pre>
<span class="c">/* �V���������h���C�u(0)�̏����� */</span>
FATFS fs;
DWORD plist[] = {50, 50, 0, 0}; <span class="c">/* 2���� */</span>
BYTE work[_MAX_SS];
f_fdisk(0, plist, work); <span class="c">/* �����h���C�u 0 �̕��� */</span>
f_mount(&fs "0:", 0);
f_mkfs("0:", 0, 0); <span class="c">/* �_���h���C�u 0 �̃t�H�[�}�b�g. �������͖��������. */</span>
f_mount(0, "0:", 0);
f_mount(&fs, "1:", 0);
f_mkfs("1:", 0, 0); <span class="c">/* �_���h���C�u 0 �̃t�H�[�}�b�g. �������͖��������. */</span>
f_mount(0, "1:", 0);
</pre>
</div>
<div class="para ref">
<h4>See Also</h4>
<p><tt><a href="filename.html#vol">Volume management</a>, <a href="mkfs.html">f_mkfs</a></tt></p>
</div>
<p class="foot"><a href="../00index_j.html">Return</a></p>
</body>
</html>
|