Teensyduino 1.52 Beta #1

Status
Not open for further replies.
I'm sorry if this is not the right place for this, but I've found this problem with our SD library that has already been fixed in the Arduino version of the SD library.

The main problem is that SD.begin(BUILTIN_SDCARD) returns false when run a second time.
The obvious solution is to potentially check if SD has already been running before calling SD.begin, but there doesn't seem to be an elegant way to do this.

While investigating this I noticed that this problem has been fixed in the arduino version of the SD library such that you can call SD.begin as many times as you want. This fix is not present in the Teensyduino version of the SD library. I have tested the fix and it works fine:

Code:
boolean SDClass::begin(uint8_t csPin) {
  /*

    Performs the initialisation required by the sdfatlib library.

    Return true if initialization succeeds, false otherwise.

   */

  [COLOR="#FF0000"][B]if(root.isOpen()) root.close();[/B][/COLOR]
 
  return card.init(SPI_HALF_SPEED, csPin) &&
         volume.init(card) &&
         root.openRoot(volume);
}
 
On OSX Catalina (versions 10.15.2 - 10.15.4), Teensyduino (1.51 and 1.52 beta) will appear to work until you open a menu. It takes a few seconds and then the program disappears.

I can not reproduce this problem on my Macbook Air running Catalina 10.15.4.

sc.jpg
 
Status
Not open for further replies.
Back
Top