Skip to content

Commit edb5ddf

Browse files
committed
soc: placeholder for esp32s3 HAL driver
soc rtc
1 parent 0b9e303 commit edb5ddf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+16739
-5831
lines changed

components/esp_serial_slave_link/essl_sdio.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@
1414

1515
#include "essl_sdio.h"
1616
#include "esp_log.h"
17-
#include "soc/host_reg.h"
1817
#include "freertos/task.h"
1918
#include "essl_internal.h"
19+
#include "soc/soc_caps.h"
20+
21+
#if SOC_SDIO_SLAVE_SUPPORTED
22+
#include "soc/host_reg.h"
2023

2124
static const char TAG[] = "essl_sdio";
2225

26+
#define HOST_SLCHOST_CONF_W_REG(pos) (HOST_SLCHOST_CONF_W0_REG+pos+(pos>23?4:0)+(pos>31?12:0))
27+
2328
#define ESSL_CMD53_END_ADDR 0x1f800
2429

2530
#define TX_BUFFER_MAX 0x1000
@@ -452,4 +457,6 @@ void essl_sdio_reset_cnt(void *arg)
452457
essl_sdio_context_t* ctx = arg;
453458
ctx->rx_got_bytes = 0;
454459
ctx->tx_sent_buffers = 0;
455-
}
460+
}
461+
462+
#endif // #if SOC_SDIO_SLAVE_SUPPORTED

components/soc/include/hal/adc_types.h

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
114
#pragma once
215

3-
#include "soc/adc_caps.h"
4-
#include "sdkconfig.h"
516
#include <stdbool.h>
17+
#include <stdint.h>
18+
#include "sdkconfig.h"
19+
#include "soc/adc_caps.h"
620

721
/**
822
* @brief ADC units selected handle.
@@ -69,7 +83,7 @@ typedef enum {
6983
ADC_WIDTH_BIT_10 = 1, /*!< ADC capture width is 10Bit. Only ESP32 is supported. */
7084
ADC_WIDTH_BIT_11 = 2, /*!< ADC capture width is 11Bit. Only ESP32 is supported. */
7185
ADC_WIDTH_BIT_12 = 3, /*!< ADC capture width is 12Bit. Only ESP32 is supported. */
72-
#ifdef CONFIG_IDF_TARGET_ESP32S2
86+
#if !CONFIG_IDF_TARGET_ESP32
7387
ADC_WIDTH_BIT_13 = 4, /*!< ADC capture width is 13Bit. Only ESP32S2 is supported. */
7488
#endif
7589
ADC_WIDTH_MAX,
@@ -112,7 +126,7 @@ typedef struct {
112126
};
113127
} adc_digi_output_data_t;
114128

115-
#ifdef CONFIG_IDF_TARGET_ESP32S2
129+
#if !CONFIG_IDF_TARGET_ESP32
116130

117131
/**
118132
* @brief ADC digital controller (DMA mode) clock system setting.
@@ -338,4 +352,4 @@ typedef struct {
338352
uint32_t threshold; /*!<Set monitor threshold of adc digital controller. */
339353
} adc_digi_monitor_t;
340354

341-
#endif // CONFIG_IDF_TARGET_ESP32S2
355+
#endif // CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3

components/soc/include/hal/spi_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ FLAG_ATTR(spi_event_t)
4949
#define SPI_HOST SPI1_HOST
5050
#define HSPI_HOST SPI2_HOST
5151
#define VSPI_HOST SPI3_HOST
52-
#elif CONFIG_IDF_TARGET_ESP32S2
52+
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
5353
// SPI_HOST (SPI1_HOST) is not supported by the SPI Master and SPI Slave driver on ESP32-S2
5454
#define SPI_HOST SPI1_HOST
5555
#define FSPI_HOST SPI2_HOST

components/soc/include/hal/systimer_hal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ void systimer_hal_counter_value_advance(systimer_counter_id_t counter_id, int64_
7171
*/
7272
void systimer_hal_init(void);
7373

74+
/**
75+
* @brief connect alarm unit to selected counter
76+
*/
77+
void systimer_hal_connect_alarm_counter(systimer_alarm_id_t alarm_id, systimer_counter_id_t counter_id);
78+
7479
#ifdef __cplusplus
7580
}
7681
#endif

components/soc/include/hal/touch_sensor_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ typedef enum {
129129
#define TOUCH_TRIGGER_MODE_DEFAULT (TOUCH_TRIGGER_BELOW) /*!<Interrupts can be triggered if sensor value gets below or above threshold */
130130
#define TOUCH_TRIGGER_SOURCE_DEFAULT (TOUCH_TRIGGER_SOURCE_SET1) /*!<The wakeup trigger source can be SET1 or both SET1 and SET2 */
131131

132-
#elif CONFIG_IDF_TARGET_ESP32S2
132+
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
133133
/**
134134
* Excessive total time will slow down the touch response.
135135
* Too small measurement time will not be sampled enough, resulting in inaccurate measurements.
@@ -145,7 +145,7 @@ typedef enum {
145145
Range: 0 ~ 0xffff */
146146
#endif // CONFIG_IDF_TARGET_ESP32
147147

148-
#ifdef CONFIG_IDF_TARGET_ESP32S2
148+
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
149149

150150
typedef enum {
151151
TOUCH_PAD_INTR_MASK_DONE = BIT(0), /*!<Measurement done for one of the enabled channels. */

components/soc/include/soc/lldesc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "esp32/rom/lldesc.h"
2121
#elif CONFIG_IDF_TARGET_ESP32S2
2222
#include "esp32s2/rom/lldesc.h"
23+
#elif CONFIG_IDF_TARGET_ESP32S3
24+
#include "esp32s3/rom/lldesc.h"
2325
#endif
2426

2527
//the size field has 12 bits, but 0 not for 4096.

components/soc/include/soc/soc_memory_layout.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ inline static bool IRAM_ATTR esp_ptr_external_ram(const void *p) {
211211
}
212212

213213
inline static bool IRAM_ATTR esp_ptr_in_iram(const void *p) {
214-
#if !CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S2
215-
return ((intptr_t)p >= SOC_IRAM_LOW && (intptr_t)p < SOC_IRAM_HIGH);
216-
#else
214+
#if CONFIG_IDF_TARGET_ESP32 && CONFIG_FREERTOS_UNICORE
217215
return ((intptr_t)p >= SOC_CACHE_APP_LOW && (intptr_t)p < SOC_IRAM_HIGH);
216+
#else
217+
return ((intptr_t)p >= SOC_IRAM_LOW && (intptr_t)p < SOC_IRAM_HIGH);
218218
#endif
219219
}
220220

components/soc/include/soc_log.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "esp32/rom/ets_sys.h" // will be removed in idf v5.0
3737
#elif CONFIG_IDF_TARGET_ESP32S2
3838
#include "esp32s2/rom/ets_sys.h"
39+
#elif CONFIG_IDF_TARGET_ESP32S3
40+
#include "esp32s3/rom/ets_sys.h"
3941
#endif
4042

4143
#define SOC_LOGE(tag, fmt, ...) esp_rom_printf("%s(err): " fmt, tag, ##__VA_ARGS__)

components/soc/soc/esp32/include/soc/host_reg.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,6 @@
812812
#define HOST_SLCHOST_STATE4_V 0xFF
813813
#define HOST_SLCHOST_STATE4_S 0
814814

815-
#define HOST_SLCHOST_CONF_W_REG(pos) (HOST_SLCHOST_CONF_W0_REG+pos+(pos>23?4:0)+(pos>31?12:0))
816-
817815
#define HOST_SLCHOST_CONF_W0_REG (DR_REG_SLCHOST_BASE + 0x6C)
818816
/* HOST_SLCHOST_CONF3 : R/W ;bitpos:[31:24] ;default: 8'h0 ; */
819817
/*description: */

0 commit comments

Comments
 (0)