Description
begin()
initialises the library, and checks the availability of the flash chip. This function has to be called before any operations with the serial flash takes place.
Syntax
begin();
Parameters
none
Returns
bool:
– true if OK
– false if the communication with the flash IC failed
Example Code
#include "SerialFlash.h"
void setup()
{
while(!Serial);
if( SerialFlash.begin() == false )
Serial.println("Error accessing the serial flash");
else
Serial.println("Serial flash - OK");
}
void loop ()
{ }
Notes and Warnings
Any operations / methods with the serial flash library will block the system if the begin() function was not called at start up.
See also
GitHub – PaulStoffregen/SerialFlash – org. code this library is based on
c_str() – function to create a 0-terminated char array from a String