We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e6e90d commit da92e9eCopy full SHA for da92e9e
src/utility/spi_drv.cpp
@@ -70,8 +70,12 @@ bool SpiDrv::initialized = false;
70
71
extern WiFiClass WiFi;
72
73
-void SpiDrv::begin()
+void SpiDrv::begin(bool force)
74
{
75
+ if(initialized && !force) {
76
+ return;
77
+ }
78
+
79
#ifdef ARDUINO_SAMD_MKRVIDOR4000
80
FPGA.begin();
81
#endif
src/utility/spi_drv.h
@@ -47,7 +47,7 @@ class SpiDrv
47
public:
48
static bool initialized;
49
50
- static void begin();
+ static void begin(bool force=false);
51
52
static void end();
53
0 commit comments