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

Only Compiles with ESP 32 2.x #1

Open
BrookeDot opened this issue Feb 27, 2025 · 0 comments
Open

Only Compiles with ESP 32 2.x #1

BrookeDot opened this issue Feb 27, 2025 · 0 comments

Comments

@BrookeDot
Copy link

BrookeDot commented Feb 27, 2025

This is an amazing Library, my favorite of making DMX easy for Arduino/ESP32. However, one must use ESP32 2.x.x to have it compile (currently 2.0.17). UIsing the newer 3.x (currently 3.1.3) will fail with the following error:

/Users/username/Documents/Arduino/easydmx/easydmx.cpp:60:23: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
   60 |     uart_param_config(dmx_uart_num, &uart_config);
      |                       ^~~~~~~~~~~~
      |                       |
      |                       int
In file included from /Users/username/Documents/Arduino/easydmx/easydmx.h:23,
                 from /Users/username/Documents/Arduino/easydmx/easydmx.cpp:19:
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:466:41: note:   initializing argument 1 of 'esp_err_t uart_param_config(uart_port_t, const uart_config_t*)'
  466 | esp_err_t uart_param_config(uart_port_t uart_num, const uart_config_t *uart_config);
      |                             ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:61:18: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
   61 |     uart_set_pin(dmx_uart_num, tx_pin, rx_pin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
      |                  ^~~~~~~~~~~~
      |                  |
      |                  int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:416:36: note:   initializing argument 1 of 'esp_err_t uart_set_pin(uart_port_t, int, int, int, int)'
  416 | esp_err_t uart_set_pin(uart_port_t uart_num, int tx_io_num, int rx_io_num, int rts_io_num, int cts_io_num);
      |                        ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:62:25: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
   62 |     uart_driver_install(dmx_uart_num, UART_BUF_SIZE * 2, UART_BUF_SIZE * 2, 20, &uart_queue, 0);
      |                         ^~~~~~~~~~~~
      |                         |
      |                         int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:118:43: note:   initializing argument 1 of 'esp_err_t uart_driver_install(uart_port_t, int, int, int, QueueDefinition**, int)'
  118 | esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int queue_size, QueueHandle_t* uart_queue, int intr_alloc_flags);
      |                               ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp: In member function 'void* EasyDMX::dmxTxTask()':
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:144:27: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  144 |         uart_wait_tx_done(dmx_uart_num, 1000);                              // Wait for the UART to finish sending
      |                           ^~~~~~~~~~~~
      |                           |
      |                           int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:491:41: note:   initializing argument 1 of 'esp_err_t uart_wait_tx_done(uart_port_t, TickType_t)'
  491 | esp_err_t uart_wait_tx_done(uart_port_t uart_num, TickType_t ticks_to_wait);
      |                             ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:145:31: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  145 |         uart_set_line_inverse(dmx_uart_num, UART_SIGNAL_TXD_INV);           // Invert the TX line for the break (LOW)
      |                               ^~~~~~~~~~~~
      |                               |
      |                               int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:262:45: note:   initializing argument 1 of 'esp_err_t uart_set_line_inverse(uart_port_t, uint32_t)'
  262 | esp_err_t uart_set_line_inverse(uart_port_t uart_num, uint32_t inverse_mask);
      |                                 ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:147:31: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  147 |         uart_set_line_inverse(dmx_uart_num, 0);                             // Revert the TX line back to normal (HIGH)
      |                               ^~~~~~~~~~~~
      |                               |
      |                               int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:262:45: note:   initializing argument 1 of 'esp_err_t uart_set_line_inverse(uart_port_t, uint32_t)'
  262 | esp_err_t uart_set_line_inverse(uart_port_t uart_num, uint32_t inverse_mask);
      |                                 ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:149:26: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  149 |         uart_write_bytes(dmx_uart_num, (const char*)&start_code, 1);        // Send the start code
      |                          ^~~~~~~~~~~~
      |                          |
      |                          int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:526:34: note:   initializing argument 1 of 'int uart_write_bytes(uart_port_t, const void*, size_t)'
  526 | int uart_write_bytes(uart_port_t uart_num, const void* src, size_t size);
      |                      ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:150:26: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  150 |         uart_write_bytes(dmx_uart_num, (const char*)dmx_data_tx + 1, 512);  // Send the DMX data
      |                          ^~~~~~~~~~~~
      |                          |
      |                          int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:526:34: note:   initializing argument 1 of 'int uart_write_bytes(uart_port_t, const void*, size_t)'
  526 | int uart_write_bytes(uart_port_t uart_num, const void* src, size_t size);
      |                      ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp: In member function 'void* EasyDMX::dmxRxTask()':
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:168:33: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  168 |                 uart_read_bytes(dmx_uart_num, data, event.size, portMAX_DELAY);  // Read the data from the UART
      |                                 ^~~~~~~~~~~~
      |                                 |
      |                                 int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:562:33: note:   initializing argument 1 of 'int uart_read_bytes(uart_port_t, void*, uint32_t, TickType_t)'
  562 | int uart_read_bytes(uart_port_t uart_num, void* buf, uint32_t length, TickType_t ticks_to_wait);
      |                     ~~~~~~~~~~~~^~~~~~~~
/Users/username/Documents/Arduino/easydmx/easydmx.cpp:187:28: error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]
  187 |                 uart_flush(dmx_uart_num);                                                   // Flush the UART buffer
      |                            ^~~~~~~~~~~~
      |                            |
      |                            int
/Users/username/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.3-489d7a2b-v1/esp32s3/include/esp_driver_uart/include/driver/uart.h:575:34: note:   initializing argument 1 of 'esp_err_t uart_flush(uart_port_t)'
  575 | esp_err_t uart_flush(uart_port_t uart_num);
      |                      ~~~~~~~~~~~~^~~~~~~~

exit status 1

Compilation error: invalid conversion from 'int' to 'uart_port_t' [-fpermissive]

I spent some time looking into the "why" here but never got to the bottom of it, but reporting here if someone else come across it and want to dig in, or work around this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant