I am looking for the equiv to (from the SDK):
SET_PERI_REG_MASK( UART_CONF0(uart_no),UART_TX_FLOW_EN); //add this sentense to add a tx flow control via MTCK( CTS )
I have a device connected via its serial port to the ESP-12E module with RX/TD and RTS/CTS criss-crossed. It works perfectly except for when the ESP-12E module is sending more data than will fit in my device's buffer (32 bytes). So, every 32 bytes I lose a few bytes. GPIO13 is my CTS input, which is U0CTS in FUNCTION_4. I tried setting the pin via:
const int CTSPin = 13; // GPIO13 for CTS input
pinMode(CTSPin, FUNCTION_4); // make pin U0CTS
This may set the pin as CTS, but it doesn't enable the hardware flow control. I can tie that pin to ground or +3.3v and it doesn't affect the data transfer. With CTS enabled it should stop the ESP8266 module from sending any data if the polarity matches the correct state (high for normal polarity). So, I would expect the line going high to stop all data being sent. Any idea on how that is actually done under the Arduino IDE?
Any ideas on how to send commands directly (like SET_PERI_REG_MASK( UART_CONF0(uart_no),UART_TX_FLOW_EN);) using the Arduino IDE?