Open oguiter opened 4 years ago
Hi @oguiter.
I haven't tested code with esp-idf 4.0, I started develop with release/4.1 branch. I know it's still on beta but, when I started, I read that they will change and will deprecate many uart related things, so I decided to start with 4.1.
***** NEXTION_DISPLAY.C
if CONFIG_PM_ENABLE
.source_clk = UART_SCLK_REF_TICK
else
.source_clk = UART_SCLK_APB
endif
In release/4.0, this option doesn't exist. To configure alternative clock, you have the option use_ref_tick
in uart_config_t. On other hand, in release/4.1, uart_config_t is moved to uart_types.h (components/soc/include/hal/*) and use_ref_tick
is marked as deprecated. New option is source_clk
which can be configured as UART_SCLK_APB or UART_SCLK_REF_TICK.
Same happens with uart_enable_pattern_det_intr
. In 4.1, is marked as deprecated. New method is uart_enable_patter_det_baud_intr
.
Said this, your compile errors are due to IDF version. Of course, it would be nice to do some work to determine IDF version and "select" rigth options/functions.
As you can see, library has a lot of work to do. It's really unmature yet. I needed it quickly at work and I only did necessary. I have in mind continue but my nextion display is busy now testing project. When It will be free again, I'll try to continue.
I can't share work HMI. It's first thing I must to do. Make basic HMI and share it before continue with code.
Any help will be appreciated. Regards.
Hi, With the last IDF (4.0), few errors appears in nextion_display.c:
(_.sourceclk is not used anymore) And:
result = uart_enable_pattern_det_baud_intr(display->uart_port, '\xFF', 3, 9, 0, 0);
changed toresult = uart_enable_pattern_det_intr(display->uart_port, '\xFF', 3, 9, 0, 0);
At the same time, could you push the associated HMI file ? It could help to work with your code. Thanks a lot