Open nicola-lunghi opened 7 years ago
see also this question https://github.com/intel-iot-devkit/mraa/issues/588
@nicolalunghiemutex in view of your PR on the same matter, do you still need this one opened?
@nicolalunghiemutex, ping.
Looks like Nicola is not going to pursue this further, but I think this functionality could be useful enough, so let me keep this open and classify as an enhancement. If you are reading this and want this functionality - feel free to vote this up to show your interest.
Hi Sorry for my disappearance! I've committed a pull request https://github.com/intel-iot-devkit/mraa/pull/685
I still not sure if its better to initialize the pin in the init flow controlfunction or to pass to the init uart a parameter to indicate the flow control status and initialize the pin on start.... In this manner the compatibility should be mantained
Also I cannot find where the uart pins are de-initialized if you close the uart. Any help on that?
in the file https://github.com/intel-iot-devkit/mraa/blob/master/src/uart/uart.c
on function
The pin for rx and tx are checked if they are gpio but not the pin for CTS/RTS hardware flow control.
So we need a way to know if there are CTS/RTS pin defined in the pin config and if you want to use the hardware flow control module the module need to configure those pins as CTS/RTS
I don't know if the best place to put this is in the init function (but we need to know the mode before the init) or in the set_flowcontrol function (or in other functions?)