Lines Matching refs:ss

5775 		WORD ss;  local
5782 if (disk_ioctl(drv, GET_SECTOR_SIZE, &ss) != RES_OK) return FR_DISK_ERR; /* Get sector size */
5783 if (ss > FF_MAX_SS || ss < FF_MIN_SS || (ss & (ss - 1))) return FR_DISK_ERR;
5785 ss = FF_MAX_SS;
5788 align = GPT_ALIGN / ss; /* Partition alignment for GPT [sector] */
5789 sz_ptbl = GPT_ITEMS * SZ_GPTE / ss; /* Size of partition table [sector] */
5796 if (pi * SZ_GPTE % ss == 0) memset(buf, 0, ss); /* Clean the buffer if needed */
5809 ofs = pi * SZ_GPTE % ss;
5816 if ((pi + 1) * SZ_GPTE % ss == 0) { /* Write the sector buffer if it is filled up */
5817 for (i = 0; i < ss; bcc = crc32(bcc, buf[i++])) ; /* Calculate table check sum */
5818 …if (disk_write(drv, buf, 2 + pi * SZ_GPTE / ss, 1) != RES_OK) return FR_DISK_ERR; /* Write to pri…
5819 …if (disk_write(drv, buf, top_bpt + pi * SZ_GPTE / ss, 1) != RES_OK) return FR_DISK_ERR; /* Write t…
5824 memset(buf, 0, ss);
5849 memset(buf, 0, ss);
5913 WORD ss; /* Sector size */ local
5942 if (disk_ioctl(pdrv, GET_SECTOR_SIZE, &ss) != RES_OK) return FR_DISK_ERR;
5943 if (ss > FF_MAX_SS || ss < FF_MIN_SS || (ss & (ss - 1))) return FR_DISK_ERR;
5945 ss = FF_MAX_SS;
5951 …n_root = (opt->n_root >= 1 && opt->n_root <= 32768 && (opt->n_root % (ss / SZDIRE)) == 0) ? opt->n…
5953 sz_au /= ss; /* Byte --> Sector */
5956 sz_buf = len / ss; /* Size of working buffer [sector] */
5960 if (!buf) buf = ff_memalloc(sz_buf * ss); /* Use heap memory for working buffer */
5988 n_ent--; ofs = (ofs + SZ_GPTE) % ss; /* Next entry */
6007 …b_vol = GPT_ALIGN / ss; sz_vol -= b_vol + GPT_ITEMS * SZ_GPTE / ss + 1; /* Estimated partition off…
6060 sz_fat = (DWORD)((sz_vol / sz_au + 2) * 4 + ss - 1) / ss; /* Number of FAT sectors */
6068 clen[0] = (szb_bit + sz_au * ss - 1) / (sz_au * ss); /* Number of allocation bitmap clusters */
6099 if (si == 0 || i == sz_buf * ss) { /* Write buffered data when buffer full or end of process */
6100 n = (i + ss - 1) / ss;
6105 clen[1] = (szb_case + sz_au * ss - 1) / (sz_au * ss); /* Number of up-case table clusters */
6109 sect = b_data; nsect = (szb_bit + ss - 1) / ss; /* Start of bitmap and number of bitmap sectors */
6112 memset(buf, 0, sz_buf * ss); /* Initialize bitmap buffer */
6113 …for (i = 0; nbit != 0 && i / 8 < sz_buf * ss; buf[i / 8] |= 1 << (i % 8), i++, nbit--) ; /* Mark u…
6123 memset(buf, 0, sz_buf * ss); i = 0; /* Clear work area and reset write offset */
6130 while (nbit != 0 && i < sz_buf * ss) { /* Create a chain */
6135 } while (nbit != 0 && i < sz_buf * ss);
6142 memset(buf, 0, sz_buf * ss);
6155 memset(buf, 0, ss); /* Rest of entries are filled with zero */
6163 memset(buf, 0, ss);
6174 …for (buf[BPB_BytsPerSecEx] = 0, i = ss; i >>= 1; buf[BPB_BytsPerSecEx]++) ; /* Log2 of sector siz…
6180 for (i = sum = 0; i < ss; i++) { /* VBR checksum */
6185 memset(buf, 0, ss);
6186 st_word(buf + ss - 2, 0xAA55); /* Signature (placed at end of sector) */
6188 for (i = 0; i < ss; sum = xsum32(buf[i++], sum)) ; /* VBR checksum */
6192 memset(buf, 0, ss);
6194 for (i = 0; i < ss; sum = xsum32(buf[i++], sum)) ; /* VBR checksum */
6198 for (i = 0; i < ss; i += 4) st_dword(buf + i, sum); /* Fill with checksum value */
6214 sz_fat = (n_clst * 4 + 8 + ss - 1) / ss; /* FAT size [sector] */
6230 sz_fat = (n + ss - 1) / ss; /* FAT size [sector] */
6232 sz_dir = (DWORD)n_root * SZDIRE / ss; /* Root directory size [sector] */
6284 memset(buf, 0, ss);
6286 st_word(buf + BPB_BytsPerSec, ss); /* Sector size [byte] */
6322 memset(buf, 0, ss);
6333 memset(buf, 0, sz_buf * ss);
6347 memset(buf, 0, ss); /* Rest of FAT area is initially zero */