> is there a way to read and write at the same time, I > mean, do I have to stop_read/start_write and stop_write/start_read to > switch between 2 modes, or is there something easier ?
You will have to stop_read/start_write. I don't know of any other way. Same thing for hard disks. Keep hard disks in mind. This makes me ask, Will your lib support hard disks? You may want to copy the aliases and method from the FAT32 lib. > also, is it possible to partial partial sector ? (though I think I > know the answer...) Just do stop read (inactive chip select). I don't think there is any harm, but I didn't see any official doc on this. There may be something in sd card specification. Maybe we can test on a few cards to see if the result is the same. This is from the top of fat32 lib. You may not need some. I see that "fat32_word_count" and others are not being used in fat32 lib anymore, I need to remove some lines. -- data media selection if (DATA_MEDIA == PATA_HARD_DISK) then -- hard disk procedures alias fat32_start_read is pata_hd_start_read -- get hard disk ready for reading alias fat32_stop_read is pata_hd_stop_read -- tell hard disk we are done reading alias fat32_start_write is pata_hd_start_write -- tell hard disk we are done reading alias fat32_stop_write is pata_hd_stop_write -- tell hard disk we are done reading alias fat32_raw_read_sector is pata_hd_read_sector -- read one sector to sector buffer array alias fat32_raw_read_sector_address is pata_hd_read_sector_address -- read one sector to sector buffer array alias fat32_raw_write_sector is pata_hd_write_sector -- write one sector from sector buffer array alias fat32_raw_write_sector_address is pata_hd_write_sector_address -- write one sector from sector buffer array alias fat32_set_idle is pata_hd_set_idle -- sets hard disk to idle state alias fat32_raw_data_byte is pata_hd_data_byte -- read one data byte from storage device alias fat32_read_pulse_byte is pata_hd_read_pulse_byte -- one byte read pulse -- hard disk vars alias fat32_word_count is pata_hd_word_count -- number of words read from current sector (byte var) alias fat32_sector_buffer is pata_hd_sector_buffer -- sector buffer array alias fat32_sector_buffer_low is pata_hd_sector_buffer_low alias fat32_sector_buffer_high is pata_hd_sector_buffer_high elsif DATA_MEDIA == SD_CARD then -- sd card procedures alias fat32_start_read is sd_start_read -- get sd card ready for reading alias fat32_stop_read is sd_stop_read -- tell sd card we are done reading alias fat32_start_write is sd_start_write alias fat32_stop_write is sd_stop_write -- tell sd card we are done reading alias fat32_raw_read_sector is sd_read_sector -- read one sector to sector buffer array alias fat32_raw_write_sector is sd_write_sector -- write one sector from sector buffer array alias fat32_raw_write_sector_address is sd_write_sector_address -- write one sector from sector buffer array alias fat32_set_idle is sd_set_idle -- sets sd card to idle state alias fat32_raw_read_sector_address is sd_read_sector_address alias fat32_read_pulse_byte is sd_read_pulse_byte -- one byte read pulse alias fat32_raw_data_byte is sd_data_byte -- read one data byte from storage device -- sd card vars alias fat32_word_count is sd_word_count -- number of words read from current sector (byte var) alias fat32_sector_buffer is sd_sector_buffer -- sector buffer array alias fat32_sector_buffer_low is sd_sector_buffer_low alias fat32_sector_buffer_high is sd_sector_buffer_high end if 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.
