From 5c2ae7bca0c4b7e4a6e11d380eaf2e723c3a9e9e Mon Sep 17 00:00:00 2001 From: Aashish chaddha Date: Fri, 12 Oct 2018 10:01:38 -0500 Subject: [PATCH] fix critical bug where I was hiding a lot more class members than i should. Add "CAN_NOT_SUPPORTED" guard to header instead of example --- drivers/CAN.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/CAN.h b/drivers/CAN.h index d4c24a1c06..ff108576e4 100644 --- a/drivers/CAN.h +++ b/drivers/CAN.h @@ -94,7 +94,6 @@ public: * @code * #include "mbed.h" * - * #if defined (DEVICE_CAN) || defined(DOXYGEN_ONLY) * * Ticker ticker; * DigitalOut led1(LED1); @@ -126,10 +125,6 @@ public: * } * } * - * #else - * #error CAN NOT SUPPORTED - * - * #endif * @endcode */ CAN(PinName rd, PinName td); @@ -304,11 +299,13 @@ protected: can_t _can; Callback _irq[IrqCnt]; PlatformMutex _mutex; -}; #endif +}; } // namespace mbed +#else + #error CAN NOT SUPPORTED #endif #endif // MBED_CAN_H