mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(esp_hal_gpio): move some caps definitions to esp_hal_gpio
This commit is contained in:
@@ -26,4 +26,5 @@ endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
REQUIRES soc hal)
|
||||
REQUIRES soc hal
|
||||
PRIV_REQUIRES esp_hal_gpio)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "soc/soc_caps.h"
|
||||
#include "hal/gpio_ll.h" //for GPIO_LL_MATRIX_DELAY_NS
|
||||
#include "hal/gpio_caps.h" //for GPIO_CAPS_GET(MATRIX_DELAY_NS)
|
||||
#include "hal/spi_flash_hal.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/log.h"
|
||||
@@ -66,8 +66,8 @@ static inline int get_dummy_n(bool gpio_is_used, int input_delay_ns, int eff_clk
|
||||
//calculate how many apb clocks a period has
|
||||
const int apbclk_n = APB_CLK_FREQ / eff_clk;
|
||||
int gpio_delay_ns = 0;
|
||||
#if GPIO_LL_MATRIX_DELAY_NS
|
||||
gpio_delay_ns = gpio_is_used ? GPIO_LL_MATRIX_DELAY_NS : 0;
|
||||
#if GPIO_CAPS_GET(MATRIX_DELAY_NS)
|
||||
gpio_delay_ns = gpio_is_used ? GPIO_CAPS_GET(MATRIX_DELAY_NS) : 0;
|
||||
#endif
|
||||
|
||||
//calculate how many apb clocks the delay is, the 1 is to compensate in case ``input_delay_ns`` is rounded off.
|
||||
|
||||
Reference in New Issue
Block a user