Skip to content

Commit f0a4451

Browse files
committed
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
1 parent 21136ca commit f0a4451

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/CAN.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ class CAN : private NonCopyable<CAN> {
9494
* @code
9595
* #include "mbed.h"
9696
*
97-
* #if defined (DEVICE_CAN) || defined(DOXYGEN_ONLY)
9897
*
9998
* Ticker ticker;
10099
* DigitalOut led1(LED1);
@@ -126,10 +125,6 @@ class CAN : private NonCopyable<CAN> {
126125
* }
127126
* }
128127
*
129-
* #else
130-
* #error CAN NOT SUPPORTED
131-
*
132-
* #endif
133128
* @endcode
134129
*/
135130
CAN(PinName rd, PinName td);
@@ -304,11 +299,13 @@ class CAN : private NonCopyable<CAN> {
304299
can_t _can;
305300
Callback<void()> _irq[IrqCnt];
306301
PlatformMutex _mutex;
307-
};
308302
#endif
303+
};
309304

310305
} // namespace mbed
311306

307+
#else
308+
#error CAN NOT SUPPORTED
312309
#endif
313310

314311
#endif // MBED_CAN_H

0 commit comments

Comments
 (0)