adl_OpenDevice and getting signal state


I open a device (34800 / 8N1 / Null modem with no flow control) on the UART2 and I want to retreive signal state through the IOC_UART_SS io control:

sUartSsIoc_t signal_state;
signal_state.op = G_IOC_OP_GET;
signal_state.sig_id = UART_SIG_RTS;
if( g_Uart_if->io_control( g_Uart_handle, IOC_UART_SS, &signal_state ) != CH_STATUS_NORMAL)
  • This always returns me an ERROR…
  • Is somebody already have acheived to use this io control ?

Moreover in the adl_user_guide.pdf, it says that the user need to use IOC_UART_LC to use the signal state control. This seems to be an error (the IOC_UART_LC is dedicated to the line coding io control…)


I wanted to “force” the signal of the CTS output pin of the UART2.

I did it with the following code:

sUartSsIoc_t signal_state;	
signal_state.op = G_IOC_OP_SET;
signal_state.sig_id = UART_SIG_RTS;
signal_state.state = 0xFF;
g_Uart_if->io_control( g_Uart_handle, IOC_UART_SS, &signal_state );

Strange… Why I need to use UART_SIG_RTS sig_id instead of the UART_SIG_CTS ??