FreeRTOS
[armadillo_firmware.git] / FreeRTOS / Common / FileSystem / FatFs-0.7e / doc / en / dwrite.html
blob2fac5463caec5182efc63ef131fd449c575f9af9
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <link rel="up" title="FatFs" href="../00index_e.html">
7 <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
8 <title>FatFs - disk_write</title>
9 </head>
11 <body>
13 <div class="para">
14 <h2>disk_write</h2>
15 <p>The disk_write writes sector(s) to the disk.</p>
16 <pre>
17 DRESULT disk_write (
18 BYTE <em>Drive</em>, /* Physical drive number */
19 const BYTE* <em>Buffer</em>, /* Pointer to the write data (may be non aligned) */
20 DWORD <em>SectorNumber</em>, /* Sector number to write */
21 BYTE <em>SectorCount</em> /* Number of sectors to write */
23 </pre>
24 </div>
26 <div class="para">
27 <h4>Parameters</h4>
28 <dl class="par">
29 <dt>Drive</dt>
30 <dd>Specifies the physical drive number.</dd>
31 <dt>Buffer</dt>
32 <dd>Pointer to the byte array to be written. The memory address specified by upper layer may or may not be aligned to word boundary.</dd>
33 <dt>SectorNumber</dt>
34 <dd>Specifies the start sector number in logical block address (LBA).</dd>
35 <dt>SectorCount</dt>
36 <dd>Specifies the number of sectors to write. The value can be 1 to 255.</dd>
37 </dl>
38 </div>
41 <div class="para">
42 <h4>Return Values</h4>
43 <dl class="ret">
44 <dt>RES_OK (0)</dt>
45 <dd>The function succeeded.</dd>
46 <dt>RES_ERROR</dt>
47 <dd>Any hard error occured during the write operation and could not recover it.</dd>
48 <dt>RES_WRPRT</dt>
49 <dd>The medium is write protected.</dd>
50 <dt>RES_PARERR</dt>
51 <dd>Invalid parameter.</dd>
52 <dt>RES_NOTRDY</dt>
53 <dd>The disk drive has not been initialized.</dd>
54 </dl>
55 </div>
58 <div class="para">
59 <h4>Description</h4>
60 <p>This function is not required in read only configuration.</p>
61 </div>
64 <p class="foot"><a href="../00index_e.html">Return</a></p>
65 </body>
66 </html>