Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hal/uart_ll.h: Fix compile with C++ (ESP32-S3/H2) (IDFGH-9255) #10640

Closed
wants to merge 1 commit into from

Commits on Jan 29, 2023

  1. hal/uart_ll.h: Fix compile with C++ (ESP32-S3/H2)

    I'm including <hal/uart_ll.h> in my C++ application because I need to
    bypass the uart driver. The inline functions in the header file fail to
    compile as C++.
    
    With xtensa-esp32s2-elf-g++ (crosstool-NG esp-2021r2-patch3) 8.4.0 it
    doesn't allow copying the union like this:
    
    hal/uart_ll.h: In function 'uint32_t uart_ll_get_baudrate(uart_dev_t*)':
    hal/uart_ll.h:181:37: error: no matching function for call to 'uart_clkdiv_reg_t(volatile uart_clkdiv_reg_t&)'
         uart_clkdiv_reg_t div_reg = hw->clkdiv;
                                         ^~~~~~
    hal/uart_ll.h: In function 'void uart_ll_inverse_signal(uart_dev_t*, uint32_t)':
    hal/uart_ll.h:822:38: error: no matching function for call to 'uart_conf0_reg_t(volatile uart_conf0_reg_t&)'
         uart_conf0_reg_t conf0_reg = hw->conf0;
                                          ^~~~~
    
    There are some instances of incompatibility specific to the ESP32-S3/H2
    header files that the previous commit didn't resolve.
    nomis committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    f9dc6ca View commit details
    Browse the repository at this point in the history