mirror of https://github.com/ARMmbed/mbed-os.git
Make interface::CAN buildable on targets without DEVICE_CAN
This commit adds provisions to enable using interface::CAN on targets that don't have DEVICE_CAN set to 1 (ie: they don't normally have a CAN peripheral).pull/14336/head
parent
d6104c8194
commit
49e58ddab6
|
@ -28,8 +28,10 @@
|
||||||
|
|
||||||
namespace mbed {
|
namespace mbed {
|
||||||
|
|
||||||
|
#ifndef FEATURE_EXPERIMENTAL_API
|
||||||
// Forward declare CAN
|
// Forward declare CAN
|
||||||
class CAN;
|
class CAN;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \defgroup drivers-public-api-can CAN
|
/** \defgroup drivers-public-api-can CAN
|
||||||
* \ingroup drivers-public-api
|
* \ingroup drivers-public-api
|
||||||
|
@ -171,6 +173,11 @@ using CAN = ::mbed::CAN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace interface
|
} // namespace interface
|
||||||
|
|
||||||
|
#if defined(FEATURE_EXPERIMENTAL_API) && !DEVICE_CAN
|
||||||
|
using CAN = interface::CAN;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
||||||
#endif /* MBED_INTERFACE_CAN_H_ */
|
#endif /* MBED_INTERFACE_CAN_H_ */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef MBED_CAN_HELPER_H
|
#ifndef MBED_CAN_HELPER_H
|
||||||
#define MBED_CAN_HELPER_H
|
#define MBED_CAN_HELPER_H
|
||||||
|
|
||||||
#if DEVICE_CAN
|
#if DEVICE_CAN || FEATURE_EXPERIMENTAL_API
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Reference in New Issue