Skip to content

Possibility of Serialx based on uart_driver_install (ESP-IDF API) #5667

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

Closed
imwhocodes opened this issue Sep 14, 2021 · 4 comments
Closed

Possibility of Serialx based on uart_driver_install (ESP-IDF API) #5667

imwhocodes opened this issue Sep 14, 2021 · 4 comments
Assignees

Comments

@imwhocodes
Copy link

Hi

I would like to use advance serial function to Arduino Serial

Reading through the source code any usage of uart_driver_install and seem to me that the serial is initialised in a different way from the one described in the API

Is the are any motivation to that?

I would like to use a custom configuration of RS485 mode, but Arduino Serial use uart->dev->fifo.rw_byte to write data to the ring buffer and not the uart_write_bytes from the API

Can you give some explanation about that?

Is possible to write an implementation using API reference functions?

Thanks,
Luca

@bertmelis
Copy link
Contributor

#5549

Isn't this already implemented (not released yet though)?

@SuGlider
Copy link
Collaborator

Hi

I would like to use advance serial function to Arduino Serial

Reading through the source code any usage of uart_driver_install and seem to me that the serial is initialised in a different way from the one described in the API

Is the are any motivation to that?

I would like to use a custom configuration of RS485 mode, but Arduino Serial use uart->dev->fifo.rw_byte to write data to the ring buffer and not the uart_write_bytes from the API

Can you give some explanation about that?

Is possible to write an implementation using API reference functions?

Thanks,
Luca

@imwhocodes
I guess, from your post, that you may be using Arduino Core 1.0.6 - which uses uart->dev->fifo.rw_byte to write data to UART. Please move to recently released Arduino Core version 2.0.0 as this version is using IDF to implement Arduino Serial.
Maybe this new version will run as you need.

@SuGlider SuGlider self-assigned this Sep 14, 2021
@VojtechBartoska
Copy link
Contributor

VojtechBartoska commented Nov 18, 2021

@imwhocodes Did you test your code with the latest version 2.0.1?

@VojtechBartoska VojtechBartoska added the Resolution: Awaiting response Waiting for response of author label Nov 18, 2021
@imwhocodes
Copy link
Author

imwhocodes commented Dec 9, 2021

Yes I tested the code, it is working and it is running in production right now

I didn't answer before because i still want to run some test,
there is a strange behaviour were I receive data from serial in chunk
(Maybe it is excepted behaviour having the interrupt moving data from harware RX buffer to userspace RX buffer )

I would also like to modify some UART conf that are only exposed by uart_struct_t (mostly the size of the TX buffer) but i'm not able to compile having this error: error: invalid use of incomplete type 'uart_t' {aka 'struct uart_struct_t'}

Anyway the main quest of this issue seem woking correctly both in the old master branch and the now released 2.0.1 tag

Thanks for the help!

@SuGlider SuGlider removed the Resolution: Awaiting response Waiting for response of author label Dec 13, 2021
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

4 participants