soc: esp32: Fix compile warnings when redefining BIT() macro

Include `soc.h` first, which will include the ESP-IDF headers -- which
will define the `BIT()` macro without checking if they're already
defined, like the Zephyr headers do.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
Leandro Pereira 2018-02-20 09:11:38 -08:00 committed by Anas Nashif
parent 3e30e8164f
commit 3beb481bab

View file

@ -3,9 +3,12 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Include esp-idf headers first to avoid redefining BIT() macro */
#include <soc.h>
#include <zephyr.h>
#include <kernel_structs.h>
#include <soc.h>
#define _REG(base, off) (*(volatile u32_t *)((base) + (off)))