diff --git a/cpu/esp32/periph/adc.c b/cpu/esp32/periph/adc.c index e511fe54e6..8dd816de5d 100644 --- a/cpu/esp32/periph/adc.c +++ b/cpu/esp32/periph/adc.c @@ -26,7 +26,6 @@ #include "adc_ctrl.h" #include "esp_common.h" #include "gpio_arch.h" -#include "rom/ets_sys.h" #include "soc/rtc_io_struct.h" #include "soc/rtc_cntl_struct.h" #include "soc/sens_reg.h" @@ -271,11 +270,11 @@ static void _adc_module_init(void) void adc_print_config(void) { - ets_printf("\tADC\t\tpins=[ "); + printf("\tADC\t\tpins=[ "); #if defined(ADC_GPIOS) for (unsigned i = 0; i < ADC_NUMOF; i++) { - ets_printf("%d ", adc_channels[i]); + printf("%d ", adc_channels[i]); } #endif /* defined(ADC_GPIOS) */ - ets_printf("]\n"); + printf("]\n"); } diff --git a/cpu/esp32/periph/dac.c b/cpu/esp32/periph/dac.c index bc569b3c31..c8d24a3dc7 100644 --- a/cpu/esp32/periph/dac.c +++ b/cpu/esp32/periph/dac.c @@ -26,7 +26,6 @@ #include "adc_ctrl.h" #include "esp_common.h" #include "gpio_arch.h" -#include "rom/ets_sys.h" #include "soc/rtc_io_struct.h" #include "soc/rtc_cntl_struct.h" #include "soc/sens_reg.h" @@ -136,11 +135,11 @@ static bool _dac_conf_check(void) void dac_print_config(void) { - ets_printf("\tDAC\t\tpins=[ "); + printf("\tDAC\t\tpins=[ "); #if defined(DAC_GPIOS) for (unsigned i = 0; i < DAC_NUMOF; i++) { - ets_printf("%d ", dac_channels[i]); + printf("%d ", dac_channels[i]); } #endif /* defined(DAC_GPIOS) */ - ets_printf("]\n"); + printf("]\n"); } diff --git a/cpu/esp32/periph/i2c_hw.c b/cpu/esp32/periph/i2c_hw.c index 4a2f379278..0ae20be194 100644 --- a/cpu/esp32/periph/i2c_hw.c +++ b/cpu/esp32/periph/i2c_hw.c @@ -869,8 +869,8 @@ static void _i2c_reset_hw (i2c_t dev) void i2c_print_config(void) { for (unsigned dev = 0; dev < I2C_NUMOF; dev++) { - ets_printf("\tI2C_DEV(%d)\tscl=%d sda=%d\n", - dev, i2c_config[dev].scl, i2c_config[dev].sda); + printf("\tI2C_DEV(%u)\tscl=%d sda=%d\n", + dev, i2c_config[dev].scl, i2c_config[dev].sda); } } diff --git a/cpu/esp32/periph/i2c_sw.c b/cpu/esp32/periph/i2c_sw.c index d8b8463cfa..568b004871 100644 --- a/cpu/esp32/periph/i2c_sw.c +++ b/cpu/esp32/periph/i2c_sw.c @@ -700,8 +700,8 @@ static /* IRAM */ int _i2c_read_byte(_i2c_bus_t* bus, uint8_t *byte, bool ack) void i2c_print_config(void) { for (unsigned dev = 0; dev < I2C_NUMOF; dev++) { - ets_printf("\tI2C_DEV(%d)\tscl=%d sda=%d\n", - dev, i2c_config[dev].scl, i2c_config[dev].sda); + printf("\tI2C_DEV(%u)\tscl=%d sda=%d\n", + dev, i2c_config[dev].scl, i2c_config[dev].sda); } } diff --git a/cpu/esp32/periph/pwm.c b/cpu/esp32/periph/pwm.c index 3bbe6a4e60..1e78ad143d 100644 --- a/cpu/esp32/periph/pwm.c +++ b/cpu/esp32/periph/pwm.c @@ -32,7 +32,6 @@ #include "gpio_arch.h" #include "driver/periph_ctrl.h" -#include "rom/ets_sys.h" #include "soc/gpio_struct.h" #include "soc/gpio_sig_map.h" #include "soc/mcpwm_reg.h" @@ -437,11 +436,11 @@ static bool _pwm_configuration(void) void pwm_print_config(void) { for (unsigned pwm = 0; pwm < PWM_NUMOF; pwm++) { - ets_printf("\tPWM_DEV(%d)\tchannels=[ ", pwm); + printf("\tPWM_DEV(%d)\tchannels=[ ", pwm); for (int i = 0; i < _pwm_hw[pwm].gpio_num; i++) { - ets_printf("%d ", _pwm_hw[pwm].gpios[i]); + printf("%d ", _pwm_hw[pwm].gpios[i]); } - ets_printf("]\n"); + printf("]\n"); } } diff --git a/cpu/esp32/periph/spi.c b/cpu/esp32/periph/spi.c index 2af333f6d1..b16a651f96 100644 --- a/cpu/esp32/periph/spi.c +++ b/cpu/esp32/periph/spi.c @@ -125,7 +125,7 @@ void IRAM_ATTR spi_init (spi_t bus) _spi[bus].signal_miso = VSPIQ_IN_IDX; break; default: LOG_TAG_ERROR("spi", "invalid SPI interface controller " - "used for SPI_DEV(%d)\n"); + "used for SPI_DEV(%d)\n", bus); break; } return; @@ -361,11 +361,11 @@ static const char* _spi_names[] = { "CSPI", "FSPI", "HSPI", "VSPI" }; void spi_print_config(void) { for (unsigned bus = 0; bus < SPI_NUMOF; bus++) { - ets_printf("\tSPI_DEV(%d)\t%s ", bus, _spi_names[spi_config[bus].ctrl]); - ets_printf("sck=%d " , spi_config[bus].sck); - ets_printf("miso=%d ", spi_config[bus].miso); - ets_printf("mosi=%d ", spi_config[bus].mosi); - ets_printf("cs=%d\n" , spi_config[bus].cs); + printf("\tSPI_DEV(%u)\t%s ", bus, _spi_names[spi_config[bus].ctrl]); + printf("sck=%d " , spi_config[bus].sck); + printf("miso=%d ", spi_config[bus].miso); + printf("mosi=%d ", spi_config[bus].mosi); + printf("cs=%d\n" , spi_config[bus].cs); } } diff --git a/cpu/esp32/periph/uart.c b/cpu/esp32/periph/uart.c index 6e5d4d2522..d0b5fcb2e6 100644 --- a/cpu/esp32/periph/uart.c +++ b/cpu/esp32/periph/uart.c @@ -205,8 +205,8 @@ void uart_system_init (void) void uart_print_config(void) { for (unsigned uart = 0; uart < UART_NUMOF; uart++) { - ets_printf("\tUART_DEV(%d)\ttxd=%d rxd=%d\n", uart, - uart_config[uart].txd, uart_config[uart].rxd); + printf("\tUART_DEV(%u)\ttxd=%d rxd=%d\n", uart, + uart_config[uart].txd, uart_config[uart].rxd); } } diff --git a/cpu/esp32/tools.c b/cpu/esp32/tools.c index 513e3abd90..23f8878e79 100644 --- a/cpu/esp32/tools.c +++ b/cpu/esp32/tools.c @@ -43,18 +43,18 @@ void esp_hexdump (const void* addr, uint32_t num, char width, uint8_t per_line) while (count < num) { if (count % per_line == 0) { - ets_printf ("%08" PRIx32 ": ", (uint32_t)((uint8_t*)addr+count*size)); + printf ("%08" PRIx32 ": ", (uint32_t)((uint8_t*)addr+count*size)); } switch (width) { - case 'b': ets_printf("%02" PRIx8 " ", addr8[count++]); break; - case 'h': ets_printf("%04" PRIx16 " ", addr16[count++]); break; - case 'w': ets_printf("%08" PRIx32 " ", addr32[count++]); break; - case 'g': ets_printf("%016" PRIx64 " ", addr64[count++]); break; - default : ets_printf("."); count++; break; + case 'b': printf("%02" PRIx8 " ", addr8[count++]); break; + case 'h': printf("%04" PRIx16 " ", addr16[count++]); break; + case 'w': printf("%08" PRIx32 " ", addr32[count++]); break; + case 'g': printf("%016" PRIx64 " ", addr64[count++]); break; + default : printf("."); count++; break; } if (count % per_line == 0) { - ets_printf ("\n"); + printf ("\n"); } } - ets_printf ("\n"); + printf ("\n"); } diff --git a/cpu/esp32/vendor/esp-idf/esp_funcs.c b/cpu/esp32/vendor/esp-idf/esp_funcs.c index c2f83ef031..16c343f9c3 100644 --- a/cpu/esp32/vendor/esp-idf/esp_funcs.c +++ b/cpu/esp32/vendor/esp-idf/esp_funcs.c @@ -165,11 +165,11 @@ void spi_ram_init(void) _spi_ram_initialized = true; } else { - ets_printf("Failed to init external SPI RAM\n"); + ESP_EARLY_LOGE("spi_ram", "Failed to init external SPI RAM\n"); _spi_ram_initialized = false; } #else - ets_printf("External SPI RAM functions not enabled\n"); + ESP_EARLY_LOGI("spi_ram", "External SPI RAM functions not enabled\n"); #endif } @@ -189,14 +189,14 @@ void spi_ram_heap_init(void) #if CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC esp_err_t r=esp_spiram_add_to_heapalloc(); if (r != ESP_OK) { - ets_printf("External SPI RAM could not be added to heap!\n"); + ESP_EARLY_LOGE("spi_ram", "External SPI RAM could not be added to heap!\n"); abort(); } #if CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL r=esp_spiram_reserve_dma_pool(CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL); if (r != ESP_OK) { - ets_printf("Could not reserve internal/DMA pool!\n"); + ESP_EARLY_LOGE("spi_ram", "Could not reserve internal/DMA pool!\n"); abort(); } #endif /* CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL */ @@ -208,7 +208,7 @@ void spi_ram_heap_init(void) #endif /* CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC */ #else /* CONFIG_SPIRAM_SUPPORT */ - ets_printf("External SPI RAM functions not enabled\n"); + ESP_EARLY_LOGI("spi_ram", "External SPI RAM functions not enabled\n"); #endif /* CONFIG_SPIRAM_SUPPORT */ }