PaulStoffregen / SD

70 stars 41 forks source link

Fix writes/reads >=64KB #7

Closed FrankBoesing closed 7 years ago

FrankBoesing commented 7 years ago

https://github.com/PaulStoffregen/SD/issues/6

Attention, the fix for read(buffer, size) is not tested. Anyway, should work. Write(buffer, size) IS tested

Adrianotiger commented 7 years ago

This fix will solve another bug: int16_t read(void* buf, uint16_t nbyte); With the current code, you can't check if you read 40kb from a 50kb file, because it returns a negative number, not the effectively bytes read.