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