diff --git a/src/drivers/nuttx/lv_nuttx_profiler.c b/src/drivers/nuttx/lv_nuttx_profiler.c index 3139c98f717e..4104111642fe 100644 --- a/src/drivers/nuttx/lv_nuttx_profiler.c +++ b/src/drivers/nuttx/lv_nuttx_profiler.c @@ -10,6 +10,8 @@ #include "lv_nuttx_profiler.h" #include "../../../lvgl.h" +#if LV_USE_NUTTX + #if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN #include @@ -94,3 +96,5 @@ static void flush_cb(const char * buf) } #endif + +#endif /* LV_USE_NUTTX */ diff --git a/src/drivers/nuttx/lv_nuttx_profiler.h b/src/drivers/nuttx/lv_nuttx_profiler.h index 8b8cf6521048..eef970c55806 100644 --- a/src/drivers/nuttx/lv_nuttx_profiler.h +++ b/src/drivers/nuttx/lv_nuttx_profiler.h @@ -14,6 +14,8 @@ extern "C" { * INCLUDES *********************/ +#if LV_USE_NUTTX + /********************* * DEFINES *********************/ @@ -32,6 +34,8 @@ void lv_nuttx_profiler_init(void); * MACROS **********************/ +#endif /* LV_USE_NUTTX */ + #ifdef __cplusplus } /*extern "C"*/ #endif