Buttons lower half: Undefine __KERNEL__ before including board.h to suppress bad included; fix some configuratin issues

This commit is contained in:
Gregory Nutt
2015-10-13 09:29:23 -06:00
parent f5f69ef85d
commit a5f44cd9fc
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -349,7 +349,9 @@ config BUTTONS_LOWER
NUM_BUTTONS, and
4. The board.h header file must not include any other
header files that are not accessibble in this context
(such as those in arch/<arch>/src/<chip>).
(such as those in arch/<arch>/src/<chip>) UNLESS those
inclusions are conditioned on __KERNEL__. button_lower.c
will undefine __KERNEL__ before included board.h.
If your board does not meet these requirements, then the
board_lower.c file can still be copied to your your
+2
View File
@@ -47,6 +47,8 @@
#include <nuttx/input/buttons.h>
#include <arch/irq.h>
#undef __KERNEL__
#include <arch/board/board.h>
#if CONFIG_BUTTONS_LOWER