mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
Buttons lower half: Undefine __KERNEL__ before including board.h to suppress bad included; fix some configuratin issues
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
#include <nuttx/input/buttons.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
|
||||
#undef __KERNEL__
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#if CONFIG_BUTTONS_LOWER
|
||||
|
||||
Reference in New Issue
Block a user