include/dsp.h: Add extern C support for use with C++

This commit is contained in:
Gregory Nutt 2018-08-23 12:54:13 -06:00
parent 95163b2c59
commit 9157422312

View File

@ -372,6 +372,15 @@ struct foc_data_s
* Public Functions
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/* Math functions */
float fast_sin(float angle);
@ -478,11 +487,7 @@ void motor_phy_params_temp_set(FAR struct motor_phy_params_s *phy,
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
}
#endif
#endif /* __INCLUDE_DSP_H */