> But you can actually read byte-by-byte, using sd_data_byte pseudo-var ? You > don't necessarily have to deal with a 512-bytes buffer.
Yes, you can maybe read byte-by-byte, but you can't write byte-by- byte. You have to write the entire block. > ... this means sd_card is "infected" (no offense :)) with FAT32 concerns. > Not a big deal in this case (start at 0, assume next is at 512), because > filesystems blocks are mutiple of 512. But if there's something more > FAT32-specific, it should be removed to be as generic as possible, so other > can build on top of it without finding weird workaround. AFAIK there's > currently no such case ! If you want, we can add some user constants and improve the lib. Maybe this: address = address * 512 can be changed to this: address = address * SD_BLOCK_SIZE SD_BLOCK_SIZE would be a optional user constant. The init procedure can tell the sd card what block size to use. It will only work on standard sized sd cards. Is there a need for block size to be variable? Is there a need for blocks to not start at byte 0? Adding this feature may be desirable (with warning about HC cards). Do you also wish that fat32 could use smaller blocks? > > I would have to ask the user: why not just use 23k256 instead of sd > > card for byte reads/writes? > > Because of yet another part ? And because it's RAM ? (I mean, it's volatile, > right ?) I guess I meant that there are other parts out there, eeproms, etc that would also serve the purpose. But SD cards are cheap these days. Would anyone use a soldered on sd card in a final design? Anyone with a final design with a removable sd card will not want to limit the design to standard capacity cards. Eventually there may not be any more standard capacity cards on the market, and so, the design maker should use blocks that are 512 bytes. > I remember some were having troubles with 4GB, which I think is classified > High Capacity. Maybe there's something wrong with HC and the lib ? I didn't notice anyone say they have a 4gb or larger card, and it is noted in my lib. This does need to be tested. a block size of 1 will allow the user to access a max of 4.294 GB (this is why HC cards are set to a block size of 512) a block size of 512 will allow the user to access 2199.023 GB Matt. -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
