From 26d6f04d7449794c487b77cb97bcdc884c018304 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 6 Jan 2022 23:13:24 +0800 Subject: [PATCH] Fix error: 'CONFIG_MOTOR_FOC_PHASES' undeclared here Signed-off-by: Xiang Xiao --- include/nuttx/motor/foc/foc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/nuttx/motor/foc/foc.h b/include/nuttx/motor/foc/foc.h index 17d995fd9c..b364752527 100644 --- a/include/nuttx/motor/foc/foc.h +++ b/include/nuttx/motor/foc/foc.h @@ -33,6 +33,8 @@ #include +#ifdef CONFIG_MOTOR_FOC + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -153,4 +155,5 @@ int foc_register(FAR const char *path, FAR struct foc_dev_s *dev); } #endif +#endif /* CONFIG_MOTOR_FOC */ #endif /* __INCLUDE_NUTTX_MOTOR_FOC_FOC_H */