diff --git a/src/sfTk/sfTkIBus.h b/src/sfTk/sfTkIBus.h index 5536dff..dd2add7 100644 --- a/src/sfTk/sfTkIBus.h +++ b/src/sfTk/sfTkIBus.h @@ -62,6 +62,12 @@ const sfTkError_t ksfTkErrBusUnderRead = ksfTkErrBaseBus + 7; */ const sfTkError_t ksfTkErrBusNotEnabled = ksfTkErrBaseBus + 8; +/** + * @brief Returned when the data received is not valid or does not match the expected format. + * + */ +const sfTkError_t ksfTkErrBusBadData = ksfTkErrFail * (ksfTkErrBaseBus + 9); + /** * @brief Interface that defines the communication bus for the SparkFun Electronics Toolkit. * diff --git a/src/sfTk/sfTkISerialBus.h b/src/sfTk/sfTkISerialBus.h index 0ece81d..5ec7446 100644 --- a/src/sfTk/sfTkISerialBus.h +++ b/src/sfTk/sfTkISerialBus.h @@ -21,7 +21,7 @@ const uint8_t ksfTkBusTypeSerialBus = 0x03; -class sfTkISerialBus : sfTkIBus +class sfTkISerialBus : public sfTkIBus { public: /** diff --git a/tests/test_uart/test_uart.ino b/tests/test_uart/test_uart.ino index e49b502..4f364a4 100644 --- a/tests/test_uart/test_uart.ino +++ b/tests/test_uart/test_uart.ino @@ -2,6 +2,10 @@ #include "SparkFun_Toolkit.h" +#ifndef USER_SW +#define USER_SW 9 +#endif + sfTkArdUART myUART; sfTkArdUART myExtUART(Serial1); sfTkArdUARTBus serialBus1(myExtUART); @@ -14,7 +18,6 @@ bool buttonPressed = false; void setup() { pinMode(LED_BUILTIN, OUTPUT); - pinMode(PIN_WL_LED, OUTPUT); pinMode(USER_SW, INPUT); Serial.begin(115200); while(!Serial) { delay(100);};