mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-29 05:38:42 +00:00
assert: Fix. Move useful functions from wrapped assert functions
Moved useful functions from wrapped assert functions, because option `CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=y` will remove this functions. Closes https://github.com/espressif/esp-idf/issues/2068
This commit is contained in:
@@ -28,8 +28,10 @@ void app_main(void)
|
||||
|
||||
gpio_num_t adc_gpio_num, dac_gpio_num;
|
||||
|
||||
assert( adc2_pad_get_io_num( ADC2_EXAMPLE_CHANNEL, &adc_gpio_num ) == ESP_OK );
|
||||
assert( dac_pad_get_io_num( DAC_EXAMPLE_CHANNEL, &dac_gpio_num ) == ESP_OK );
|
||||
r = adc2_pad_get_io_num( ADC2_EXAMPLE_CHANNEL, &adc_gpio_num );
|
||||
assert( r == ESP_OK );
|
||||
r = dac_pad_get_io_num( DAC_EXAMPLE_CHANNEL, &dac_gpio_num );
|
||||
assert( r == ESP_OK );
|
||||
|
||||
printf("ADC channel %d @ GPIO %d, DAC channel %d @ GPIO %d.\n", ADC2_EXAMPLE_CHANNEL, adc_gpio_num,
|
||||
DAC_EXAMPLE_CHANNEL, dac_gpio_num );
|
||||
|
Reference in New Issue
Block a user