Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion components/efuse/esp32c3/esp_efuse_utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <sys/param.h>
#include "sdkconfig.h"
#include "esp_log.h"
#include "assert.h"
Expand Down
4 changes: 4 additions & 0 deletions components/esp_common/include/esp_bit_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@
#define BIT32 (0x00000001ULL << 32)

#ifndef __ASSEMBLER__
#ifndef __ZEPHYR__
#ifndef BIT
#define BIT(nr) (1UL << (nr))
#endif
#else
#include <zephyr/sys/util.h>
#endif
#ifndef BIT64
#define BIT64(_n) (1ULL << (_n))
#endif
Expand Down
2 changes: 1 addition & 1 deletion components/esp_rom/include/esp32c3/rom/uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef enum {
} UartFlowCtrl;

typedef enum {
EMPTY,
EMPTY_STATE,
UNDER_WRITE,
WRITE_OVER
} RcvMsgBuffState;
Expand Down
1 change: 0 additions & 1 deletion components/esp_system/port/soc/esp32c3/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#if !defined(__ZEPHYR__)
#include <sys/time.h>
#endif
#include <sys/param.h>
#include "sdkconfig.h"
#include "esp_attr.h"
#include "esp_log.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp_system/port/soc/esp32s2/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#if !defined(__ZEPHYR__)
#include <sys/time.h>
#endif
#include <sys/param.h>

#if !defined(__ZEPHYR__)
#include "sdkconfig.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp_system/port/soc/esp32s3/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <sys/time.h>
#include "sdkconfig.h"
#endif
#include <sys/param.h>
#include "esp_attr.h"
#include "esp_log.h"
#include "esp32s3/clk.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp_timer/src/esp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/param.h>
#include <string.h>
#include "soc/soc.h"
#include "esp_types.h"
Expand Down
26 changes: 14 additions & 12 deletions components/esp_timer/src/esp_timer_impl_systimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __ZEPHYR__
#include "sys/param.h"
#include "freertos/FreeRTOS.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove the freertos.h include.

#else
#ifdef CONFIG_SOC_ESP32C3
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
#define ISR_HANDLER isr_handler_t
#else
#include <zephyr/drivers/interrupt_controller/intc_esp32.h>
#define ISR_HANDLER intr_handler_t
#endif
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#endif /* __ZEPHYR__ */

#include "esp_timer_impl.h"
#include "esp_err.h"
#include "esp_timer.h"
Expand All @@ -14,21 +28,9 @@
#include "soc/periph_defs.h"
#include "soc/soc_caps.h"
#include "soc/rtc.h"
#ifndef __ZEPHYR__
#include "freertos/FreeRTOS.h"
#endif
#include "hal/systimer_ll.h"
#include "hal/systimer_types.h"
#include "hal/systimer_hal.h"
#include <zephyr/kernel.h>

#ifdef CONFIG_SOC_ESP32C3
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
#define ISR_HANDLER isr_handler_t
#else
#include <zephyr/drivers/interrupt_controller/intc_esp32.h>
#define ISR_HANDLER intr_handler_t
#endif

/**
* @file esp_timer_systimer.c
Expand Down
4 changes: 4 additions & 0 deletions components/hal/systimer_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef __ZEPHYR__
#include <sys/param.h>
#else
#include <zephyr/sys/util.h>
#endif
#include "soc/soc_caps.h"
#include "hal/systimer_hal.h"
#include "hal/systimer_ll.h"
Expand Down
4 changes: 4 additions & 0 deletions components/spi_flash/esp32s3/spi_timing_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

#include <stdlib.h>
#ifndef __ZEPHYR__
#include <sys/param.h>
#else
#include <zephyr/sys/util.h>
#endif
#include "sdkconfig.h"
#include "string.h"
#include "esp_attr.h"
Expand Down
7 changes: 6 additions & 1 deletion components/spi_flash/flash_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <sys/param.h> // For MIN/MAX(a, b)

#if !defined(__ZEPHYR__)
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/semphr.h>
#endif

#if !defined(__ZEPHYR__)
#include <sys/param.h> // For MIN/MAX(a, b)
#else
#include <zephyr/sys/util.h>
#endif

#include <soc/soc.h>
#include <soc/soc_memory_layout.h>
#include "sdkconfig.h"
Expand Down
4 changes: 4 additions & 0 deletions components/spi_flash/spi_flash_timing_tuning.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
#include "esp32s3/rom/cache.h"
#endif

#ifndef __ZEPHYR__
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(*(arr)))
#else
#include <zephyr/sys/util.h>
#endif

#if SPI_TIMING_FLASH_NEEDS_TUNING || SPI_TIMING_PSRAM_NEEDS_TUNING
const static char *TAG = "MSPI Timing";
Expand Down