1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Check that pins needed by Wire are defined at compile-time (#4261)

This commit is contained in:
Develo 2018-01-30 14:59:47 -03:00 committed by GitHub
parent 4bafbe5514
commit 9ba8f77678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,13 @@ extern "C" {
#include "twi.h"
#include "Wire.h"
//Some boards don't have these pins available, and hence don't support Wire.
//Check here for compile-time error.
#if !defined(PIN_WIRE_SDA) || !defined(PIN_WIRE_SCL)
#error Wire library is not supported on this board
#endif
// Initialize Class Variables //////////////////////////////////////////////////
uint8_t TwoWire::rxBuffer[BUFFER_LENGTH];