Skip to content

Commit a7f36eb

Browse files
authored
Merge pull request #15 from jaysalOC3/update-esp32-sigrok
Update ESP32 Sigrok integration with the latest version of the Sigrok software
2 parents 2f903ab + 29a3cf8 commit a7f36eb

File tree

5 files changed

+30
-28
lines changed

5 files changed

+30
-28
lines changed

main/analog.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if 1
22
#include "analog.h"
3-
#include <driver/adc.h>
3+
#include <esp_adc/adc_oneshot.h>
44
#include "freertos/FreeRTOS.h"
55
#include "freertos/semphr.h"
66
#include "freertos/task.h"
@@ -11,7 +11,7 @@
1111
#include "sdkconfig.h"
1212
#define USE_SEMA 1
1313
#include "soc/efuse_reg.h"
14-
#include <esp_int_wdt.h>
14+
#include "esp_private/esp_int_wdt.h"
1515

1616

1717
#ifdef CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ
@@ -211,7 +211,7 @@ A(V) = [(240 -<Raw_Byte> ) * (<Volts_Div> / 25) - (<Volts_Div> * 4.6)]
211211
212212
A(V) + (<VD> * 4.6) = [(240 -<Raw_Byte> ) * (<VD> / 25) ]
213213
214-
AV/VD + 4.6/VD = (240 -R) / 25
214+
AV/VD + 4.6/VD = (240 - R) / 25
215215
216216
(AV/VD + 4.6/VD ) *25 = 240 - R
217217
@@ -677,4 +677,3 @@ bool samples_finnished() {
677677

678678
return ret;
679679
}
680-
#endif

main/app_main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ SOFTWARE.
3939
#include "scpi_server.h"
4040
#include "analog.h"
4141
#include <driver/rmt.h>
42-
#include "driver/i2s.h"
43-
#include "driver/adc.h"
42+
#include "driver/i2s_std.h"
43+
#include "driver/adc_oneshot.h"
4444
#include "app-config.h"
4545
#include "Header.h"
4646
#include "ota_server.h"

main/collector.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#include "nvs_flash.h"
1414
#include "collector.h"
1515
#include "driver/ledc.h"
16+
#include <esp_adc/adc_oneshot.h>
17+
#include <spi_flash_mmap.h>
18+
#include <driver/i2s_std.h>
1619

1720
#ifdef CONFIG_IDF_TARGET_ESP32
1821
#define LEDC_HS_TIMER LEDC_TIMER_0
@@ -708,7 +711,7 @@ void i2s_parallel_setup(const i2s_parallel_config_t *cfg) {
708711
// Clear flags which are used in I2S serial mode
709712
//I2S0.sample_rate_conf.rx_bits_mod = 8;
710713
I2S0.sample_rate_conf.rx_bits_mod = 16;
711-
//dev->sample_rate_conf.rx_bck_div_num = 16; //ToDo: Unsure about what this does...
714+
//dev->sample_rate_conf.tx_bck_div_num = 16; //ToDo: Unsure about what this does...
712715
I2S0.sample_rate_conf.rx_bck_div_num = 1; // datasheet says this must be 2 or greater (but 1 seems to work)
713716

714717
// this combination is 20MHz
@@ -1001,4 +1004,4 @@ uint8_t* get_values() {
10011004
}
10021005

10031006

1004-
#endif
1007+
#endif

main/sampler.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,4 +330,4 @@ uint8_t* get_values() {
330330
//return((uint16_t*)s_state->dma_buf[0]);
331331
return((uint8_t*)dma_buff);
332332
}
333-
#endif
333+
#endif

platformio.ini

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
; PlatformIO Project Configuration File
2-
;
3-
; Build options: build flags, source filter
4-
; Upload options: custom upload port, speed and extra flags
5-
; Library options: dependencies, extra library storages
6-
; Advanced options: extra scripting
7-
;
8-
; Please visit documentation for the other options and examples
9-
; http://docs.platformio.org/page/projectconf.html
10-
11-
[platformio]
12-
src_dir = main
13-
lib_dir = components
14-
15-
[env:esp32dev]
16-
platform = espressif32
17-
board = esp32dev
18-
framework = espidf
19-
lib_deps = libscpi
1+
; PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; http://docs.platformio.org/page/projectconf.html
10+
11+
[platformio]
12+
src_dir = main
13+
lib_dir = components
14+
15+
[env:esp32dev]
16+
platform = espressif32
17+
board = esp32dev
18+
framework = espidf
19+
lib_deps = libscpi, esp_adc

0 commit comments

Comments
 (0)