Skip to content

Commit a43fa64

Browse files
authored
Merge pull request #316 from nated0g/master
moved ets_sys.h includes to seperate file
2 parents 66a6155 + 6d4616b commit a43fa64

File tree

13 files changed

+25
-156
lines changed

13 files changed

+25
-156
lines changed

components/bmp180/bmp180.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,7 @@
3838

3939
#include <esp_err.h>
4040
#include <esp_log.h>
41-
#if CONFIG_IDF_TARGET_ESP32
42-
#include <esp32/rom/ets_sys.h>
43-
#elif CONFIG_IDF_TARGET_ESP32S2
44-
#include <esp32s2/rom/ets_sys.h>
45-
#elif CONFIG_IDF_TARGET_ESP32S3
46-
#include <esp32s3/rom/ets_sys.h>
47-
#elif CONFIG_IDF_TARGET_ESP32C3
48-
#include <esp32c3/rom/ets_sys.h>
49-
#elif CONFIG_IDF_TARGET_ESP32H2
50-
#include <esp32h2/rom/ets_sys.h>
51-
#elif CONFIG_IDF_TARGET_ESP32C2
52-
#include <esp32c2/rom/ets_sys.h>
53-
#endif
41+
#include <ets_sys.h>
5442
#include <esp_idf_lib_helpers.h>
5543

5644
#define I2C_FREQ_HZ 1000000 // Max 1MHz for esp-idf

components/dht/dht.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,7 @@
4343
#include <freertos/FreeRTOS.h>
4444
#include <string.h>
4545
#include <esp_log.h>
46-
#if CONFIG_IDF_TARGET_ESP32
47-
#include <esp32/rom/ets_sys.h>
48-
#elif CONFIG_IDF_TARGET_ESP32S2
49-
#include <esp32s2/rom/ets_sys.h>
50-
#elif CONFIG_IDF_TARGET_ESP32S3
51-
#include <esp32s3/rom/ets_sys.h>
52-
#elif CONFIG_IDF_TARGET_ESP32C3
53-
#include <esp32c3/rom/ets_sys.h>
54-
#elif CONFIG_IDF_TARGET_ESP32H2
55-
#include <esp32h2/rom/ets_sys.h>
56-
#elif CONFIG_IDF_TARGET_ESP32C2
57-
#include <esp32c2/rom/ets_sys.h>
58-
#endif
46+
#include <ets_sys.h>
5947
#include <esp_idf_lib_helpers.h>
6048

6149
// DHT timer precision in microseconds

components/ds1302/ds1302.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,7 @@
4040
*/
4141
#include <freertos/FreeRTOS.h>
4242
#include <string.h>
43-
#if CONFIG_IDF_TARGET_ESP32
44-
#include <esp32/rom/ets_sys.h>
45-
#elif CONFIG_IDF_TARGET_ESP32S2
46-
#include <esp32s2/rom/ets_sys.h>
47-
#elif CONFIG_IDF_TARGET_ESP32S3
48-
#include <esp32s3/rom/ets_sys.h>
49-
#elif CONFIG_IDF_TARGET_ESP32C3
50-
#include <esp32c3/rom/ets_sys.h>
51-
#elif CONFIG_IDF_TARGET_ESP32H2
52-
#include <esp32h2/rom/ets_sys.h>
53-
#elif CONFIG_IDF_TARGET_ESP32C2
54-
#include <esp32c2/rom/ets_sys.h>
55-
#endif
43+
#include <ets_sys.h>
5644
#include <esp_idf_lib_helpers.h>
5745
#include "ds1302.h"
5846

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#if CONFIG_IDF_TARGET_ESP32
2+
#include <esp32/rom/ets_sys.h>
3+
#elif CONFIG_IDF_TARGET_ESP32S2
4+
#include <esp32s2/rom/ets_sys.h>
5+
#elif CONFIG_IDF_TARGET_ESP32S3
6+
#include <esp32s3/rom/ets_sys.h>
7+
#elif CONFIG_IDF_TARGET_ESP32C3
8+
#include <esp32c3/rom/ets_sys.h>
9+
#elif CONFIG_IDF_TARGET_ESP32H2
10+
#include <esp32h2/rom/ets_sys.h>
11+
#elif CONFIG_IDF_TARGET_ESP32C2
12+
#include <esp32c2/rom/ets_sys.h>
13+
#endif

components/hd44780/hd44780.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,7 @@
3939
#include <string.h>
4040
#include <esp_system.h>
4141
#include <esp_idf_lib_helpers.h>
42-
#if CONFIG_IDF_TARGET_ESP32
43-
#include <esp32/rom/ets_sys.h>
44-
#elif CONFIG_IDF_TARGET_ESP32S2
45-
#include <esp32s2/rom/ets_sys.h>
46-
#elif CONFIG_IDF_TARGET_ESP32S3
47-
#include <esp32s3/rom/ets_sys.h>
48-
#elif CONFIG_IDF_TARGET_ESP32C3
49-
#include <esp32c3/rom/ets_sys.h>
50-
#elif CONFIG_IDF_TARGET_ESP32H2
51-
#include <esp32h2/rom/ets_sys.h>
52-
#elif CONFIG_IDF_TARGET_ESP32C2
53-
#include <esp32c2/rom/ets_sys.h>
54-
#endif
42+
#include <ets_sys.h>
5543
#include "hd44780.h"
5644

5745
#define MS 1000

components/hx711/hx711.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,7 @@
3737
#include <freertos/FreeRTOS.h>
3838
#include <freertos/task.h>
3939
#include <esp_timer.h>
40-
#if CONFIG_IDF_TARGET_ESP32
41-
#include <esp32/rom/ets_sys.h>
42-
#elif CONFIG_IDF_TARGET_ESP32S2
43-
#include <esp32s2/rom/ets_sys.h>
44-
#elif CONFIG_IDF_TARGET_ESP32S3
45-
#include <esp32s3/rom/ets_sys.h>
46-
#elif CONFIG_IDF_TARGET_ESP32C3
47-
#include <esp32c3/rom/ets_sys.h>
48-
#elif CONFIG_IDF_TARGET_ESP32H2
49-
#include <esp32h2/rom/ets_sys.h>
50-
#elif CONFIG_IDF_TARGET_ESP32C2
51-
#include <esp32c2/rom/ets_sys.h>
52-
#endif
40+
#include <ets_sys.h>
5341
#include <esp_idf_lib_helpers.h>
5442
#include "hx711.h"
5543

components/led_strip/led_strip.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,7 @@
3434
#include <esp_log.h>
3535
#include <esp_attr.h>
3636
#include <stdlib.h>
37-
#if CONFIG_IDF_TARGET_ESP32
38-
#include <esp32/rom/ets_sys.h>
39-
#elif CONFIG_IDF_TARGET_ESP32S2
40-
#include <esp32s2/rom/ets_sys.h>
41-
#elif CONFIG_IDF_TARGET_ESP32S3
42-
#include <esp32s3/rom/ets_sys.h>
43-
#elif CONFIG_IDF_TARGET_ESP32C3
44-
#include <esp32c3/rom/ets_sys.h>
45-
#elif CONFIG_IDF_TARGET_ESP32H2
46-
#include <esp32h2/rom/ets_sys.h>
47-
#elif CONFIG_IDF_TARGET_ESP32C2
48-
#include <esp32c2/rom/ets_sys.h>
49-
#endif
37+
#include <ets_sys.h>
5038
#include <esp_idf_lib_helpers.h>
5139

5240
#if HELPER_TARGET_IS_ESP8266

components/ms5611/ms5611.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,7 @@
4747
#include <esp_log.h>
4848
#include <freertos/FreeRTOS.h>
4949
#include <freertos/task.h>
50-
#if CONFIG_IDF_TARGET_ESP32
51-
#include <esp32/rom/ets_sys.h>
52-
#elif CONFIG_IDF_TARGET_ESP32S2
53-
#include <esp32s2/rom/ets_sys.h>
54-
#elif CONFIG_IDF_TARGET_ESP32S3
55-
#include <esp32s3/rom/ets_sys.h>
56-
#elif CONFIG_IDF_TARGET_ESP32C3
57-
#include <esp32c3/rom/ets_sys.h>
58-
#elif CONFIG_IDF_TARGET_ESP32H2
59-
#include <esp32h2/rom/ets_sys.h>
60-
#elif CONFIG_IDF_TARGET_ESP32C2
61-
#include <esp32c2/rom/ets_sys.h>
62-
#endif
50+
#include <ets_sys.h>
6351

6452
#define I2C_FREQ_HZ 400000 // 400 kHz
6553

components/onewire/onewire.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,7 @@
5252
#include <string.h>
5353
#include <freertos/FreeRTOS.h>
5454
#include <freertos/task.h>
55-
#if CONFIG_IDF_TARGET_ESP32
56-
#include <esp32/rom/ets_sys.h>
57-
#elif CONFIG_IDF_TARGET_ESP32S2
58-
#include <esp32s2/rom/ets_sys.h>
59-
#elif CONFIG_IDF_TARGET_ESP32S3
60-
#include <esp32s3/rom/ets_sys.h>
61-
#elif CONFIG_IDF_TARGET_ESP32C3
62-
#include <esp32c3/rom/ets_sys.h>
63-
#elif CONFIG_IDF_TARGET_ESP32H2
64-
#include <esp32h2/rom/ets_sys.h>
65-
#elif CONFIG_IDF_TARGET_ESP32C2
66-
#include <esp32c2/rom/ets_sys.h>
67-
#endif
55+
#include <ets_sys.h>
6856
#include <esp_idf_lib_helpers.h>
6957
#include "onewire.h"
7058

components/pca9685/pca9685.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,7 @@
4242

4343
#include <esp_system.h>
4444
#include <esp_log.h>
45-
#if CONFIG_IDF_TARGET_ESP32
46-
#include <esp32/rom/ets_sys.h>
47-
#elif CONFIG_IDF_TARGET_ESP32S2
48-
#include <esp32s2/rom/ets_sys.h>
49-
#elif CONFIG_IDF_TARGET_ESP32S3
50-
#include <esp32s3/rom/ets_sys.h>
51-
#elif CONFIG_IDF_TARGET_ESP32C3
52-
#include <esp32c3/rom/ets_sys.h>
53-
#elif CONFIG_IDF_TARGET_ESP32H2
54-
#include <esp32h2/rom/ets_sys.h>
55-
#elif CONFIG_IDF_TARGET_ESP32C2
56-
#include <esp32c2/rom/ets_sys.h>
57-
#endif
45+
#include <ets_sys.h>
5846

5947
#define I2C_FREQ_HZ 1000000 // 1 Mhz
6048

0 commit comments

Comments
 (0)