diff --git a/examples/others/observer/lv_example_observer_2.c b/examples/others/observer/lv_example_observer_2.c index b9fb453401..7e94756e65 100644 --- a/examples/others/observer/lv_example_observer_2.c +++ b/examples/others/observer/lv_example_observer_2.c @@ -1,5 +1,5 @@ #include "../../lv_examples.h" -#if LV_USE_OBSERVER && LV_USE_SLIDER && LV_USE_LABEL && LV_BUILD_EXAMPLES +#if LV_USE_OBSERVER && LV_USE_SLIDER && LV_USE_LABEL && LV_USE_KEYBOARD && LV_BUILD_EXAMPLES /*This the only interface between the UI and the application*/ static lv_subject_t engine_subject; diff --git a/examples/widgets/keyboard/lv_example_keyboard_3.c b/examples/widgets/keyboard/lv_example_keyboard_3.c index bacce51e35..1899a32329 100644 --- a/examples/widgets/keyboard/lv_example_keyboard_3.c +++ b/examples/widgets/keyboard/lv_example_keyboard_3.c @@ -1,5 +1,5 @@ #include "../../lv_examples.h" -#if LV_USE_BUTTONMATRIX && LV_BUILD_EXAMPLES +#if LV_USE_KEYBOARD && LV_BUILD_EXAMPLES static void event_cb(lv_event_t * e) { diff --git a/src/widgets/keyboard/lv_keyboard.c b/src/widgets/keyboard/lv_keyboard.c index 64bb09e473..ab28df4838 100644 --- a/src/widgets/keyboard/lv_keyboard.c +++ b/src/widgets/keyboard/lv_keyboard.c @@ -15,6 +15,15 @@ #include "../../misc/lv_assert.h" #include "../../stdlib/lv_string.h" +/*Testing of dependencies*/ +#if LV_USE_BUTTONMATRIX == 0 + #error "lv_buttonmatrix is required. Enable it in lv_conf.h (LV_USE_BUTTONMATRIX 1) " +#endif + +#if LV_USE_TEXTAREA == 0 + #error "lv_textarea is required. Enable it in lv_conf.h (LV_USE_TEXTAREA 1) " +#endif + /********************* * DEFINES *********************/ diff --git a/src/widgets/keyboard/lv_keyboard.h b/src/widgets/keyboard/lv_keyboard.h index 9979f6277b..85c3532020 100644 --- a/src/widgets/keyboard/lv_keyboard.h +++ b/src/widgets/keyboard/lv_keyboard.h @@ -17,15 +17,6 @@ extern "C" { #if LV_USE_KEYBOARD -/*Testing of dependencies*/ -#if LV_USE_BUTTONMATRIX == 0 -#error "lv_buttonmatrix is required. Enable it in lv_conf.h (LV_USE_BUTTONMATRIX 1) " -#endif - -#if LV_USE_TEXTAREA == 0 -#error "lv_textarea is required. Enable it in lv_conf.h (LV_USE_TEXTAREA 1) " -#endif - /********************* * DEFINES *********************/