@@ -62,7 +62,7 @@ void onReceive_cb(void) {
62
62
63
63
// This function is called by before each test is run
64
64
void setup_test (String test_name, int8_t rx_pin = UART1_RX_DEFAULT, int8_t tx_pin = UART1_TX_DEFAULT) {
65
- log_i (" Setting up %s test" , test_name.c_str ());
65
+ log_d (" Setting up %s test" , test_name.c_str ());
66
66
67
67
current_test = test_name;
68
68
uart1_rx_pin = rx_pin;
@@ -74,12 +74,12 @@ void setup_test(String test_name, int8_t rx_pin = UART1_RX_DEFAULT, int8_t tx_pi
74
74
Serial1.setPins (uart1_rx_pin, uart1_tx_pin);
75
75
uart_internal_loopback (1 , true );
76
76
delay (100 );
77
- log_i (" Running %s test" , test_name.c_str ());
77
+ log_d (" Running %s test" , test_name.c_str ());
78
78
}
79
79
80
80
// This function is called after each test is run
81
81
void teardown_test (void ) {
82
- log_i (" Tearing down %s test" , current_test.c_str ());
82
+ log_d (" Tearing down %s test" , current_test.c_str ());
83
83
if (test_executed) {
84
84
pinMode (uart1_rx_pin, INPUT_PULLUP);
85
85
pinMode (uart1_tx_pin, OUTPUT);
@@ -154,7 +154,7 @@ void ARDUINO_ISR_ATTR adcComplete() {
154
154
155
155
void adc_continuous_test (void ) {
156
156
#if !SOC_ADC_SUPPORTED || CONFIG_IDF_TARGET_ESP32P4
157
- setup_test (" ADC_Continuous - NO ADC Support" );
157
+ setup_test (" ADC_Continuous - NO Support ** P4 fails " );
158
158
#else
159
159
setup_test (" ADC_Continuous" , ADC1_DEFAULT, ADC2_DEFAULT);
160
160
test_executed = true ;
@@ -168,10 +168,8 @@ void adc_continuous_test(void) {
168
168
analogContinuous (adc_pins, adc_pins_count, 6 , 20000 , &adcComplete);
169
169
analogContinuousStart ();
170
170
171
- Serial.println ();
172
171
while (adc_coversion_done == false ) {
173
- Serial.print (" ." );
174
- delay (500 );
172
+ delay (1 );
175
173
}
176
174
177
175
if (!analogContinuousRead (&result, 0 )) {
@@ -230,13 +228,11 @@ void i2s_test(void) {
230
228
I2SClass i2s;
231
229
232
230
i2s.setPins (uart1_rx_pin, uart1_tx_pin, -1 );
233
-
234
231
i2s.setTimeout (1000 );
235
232
if (!i2s.begin (I2S_MODE_STD, 16000 , I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO)) {
236
233
}
237
234
#endif
238
235
teardown_test ();
239
- delay (500 ); Serial.println (" Exting I2S driver..." ); delay (500 );
240
236
}
241
237
242
238
void i2c_test (void ) {
@@ -287,34 +283,18 @@ void setup() {
287
283
Serial1.onReceive (onReceive_cb);
288
284
uart_internal_loopback (1 , true );
289
285
290
- Serial.println (" starting gpio_test()" );
291
286
gpio_test ();
292
- Serial.println (" starting sigmadelta_test()" );
293
287
sigmadelta_test ();
294
- Serial.println (" starting ledc_test()" );
295
288
ledc_test ();
296
- Serial.println (" starting rmt_test()" );
297
289
rmt_test ();
298
- Serial.println (" \t ==>starting i2s_test()" );
299
- i2s_test (); // apos esta linha temos um [E][esp32-hal-periman.c:122] perimanSetPinBus(): Invalid pin: 255
300
- Serial.println (" \t ==>Back to setup()" );
301
- Serial.println (" \t ==>starting spi_test()" );
290
+ i2s_test ();
302
291
spi_test ();
303
- Serial.println (" \t ==>starting i2c_test()" );
304
292
i2c_test ();
305
- Serial.println (" \t ==>ended i2c_test()" );
306
- Serial.println (" starting adc_oneshot_test()" );
307
293
adc_oneshot_test ();
308
- Serial.println (" starting adc_continuous_test()" );
309
294
adc_continuous_test ();
310
- Serial.println (" starting dac_test()" );
311
295
dac_test ();
312
- Serial.println (" starting touch_test()" );
313
296
touch_test ();
314
- Serial.println (" starting gpio_test()" );
315
297
316
298
// Print to Serial1 to avoid buffering issues
317
299
Serial1.println (" Peripheral Manager test done" );
318
300
}
319
-
320
- void loop () {}
0 commit comments