Buttons lower half: Undefine __KERNEL__ before including board.h to suppress bad included; fix some configuratin issues
This commit is contained in:
parent
f5f69ef85d
commit
a5f44cd9fc
@ -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
|
||||
|
@ -175,6 +175,6 @@ Things to Do
|
||||
done. That garbarge collection should search for valid blocks that no
|
||||
longer contain valid data. It should pre-erase them, put them in
|
||||
a good but empty state... all ready for file system re-organization.
|
||||
|
||||
|
||||
- And worse, when NXFSS reorganization the FLASH a power cycle can
|
||||
damage the file system content if it happens at the wrong time.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user