Commit 4e5cbdaa authored by me-no-dev's avatar me-no-dev

Add declarations for all Serial, SPI and Wire buses

parent 12ca9e8b
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL) #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
HardwareSerial Serial(0); HardwareSerial Serial(0);
HardwareSerial Serial1(1);
HardwareSerial Serial2(2);
#endif #endif
HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {} HardwareSerial::HardwareSerial(int uart_nr) : _uart_nr(uart_nr), _uart(NULL) {}
......
...@@ -79,6 +79,8 @@ protected: ...@@ -79,6 +79,8 @@ protected:
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL) #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
extern HardwareSerial Serial; extern HardwareSerial Serial;
extern HardwareSerial Serial1;
extern HardwareSerial Serial2;
#endif #endif
#endif #endif
...@@ -288,3 +288,4 @@ void SPIClass::writePattern_(uint8_t * data, uint8_t size, uint8_t repeat) ...@@ -288,3 +288,4 @@ void SPIClass::writePattern_(uint8_t * data, uint8_t size, uint8_t repeat)
} }
SPIClass SPI(VSPI); SPIClass SPI(VSPI);
SPIClass SPI1(HSPI);
...@@ -83,5 +83,6 @@ public: ...@@ -83,5 +83,6 @@ public:
}; };
extern SPIClass SPI; extern SPIClass SPI;
extern SPIClass SPI1;
#endif #endif
...@@ -364,3 +364,4 @@ void TwoWire::dumpI2C() ...@@ -364,3 +364,4 @@ void TwoWire::dumpI2C()
} }
TwoWire Wire = TwoWire(0); TwoWire Wire = TwoWire(0);
TwoWire Wire1 = TwoWire(1);
...@@ -134,6 +134,7 @@ public: ...@@ -134,6 +134,7 @@ public:
}; };
extern TwoWire Wire; extern TwoWire Wire;
extern TwoWire Wire1;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment