mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Applying adafruit SD updates (available() overful fix).
http://code.google.com/p/arduino/issues/detail?id=595
This commit is contained in:
parent
f3d8628c5e
commit
5ba38fa9bd
@ -101,7 +101,10 @@ int File::read(void *buf, uint16_t nbyte) {
|
||||
|
||||
int File::available() {
|
||||
if (! _file) return 0;
|
||||
return size() - position();
|
||||
|
||||
uint32_t n = size() - position();
|
||||
|
||||
return n > 0X7FFF ? 0X7FFF : n;
|
||||
}
|
||||
|
||||
void File::flush() {
|
||||
|
@ -80,7 +80,7 @@ void setup()
|
||||
|
||||
|
||||
// print the type and size of the first FAT-type volume
|
||||
long volumesize;
|
||||
uint32_t volumesize;
|
||||
Serial.print("\nVolume type is FAT");
|
||||
Serial.println(volume.fatType(), DEC);
|
||||
Serial.println();
|
||||
|
Loading…
Reference in New Issue
Block a user