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