User manual

140
virtual int set_extra_command(void * extra_command, int arg) = 0;
Set serial line’s extra features.
extra - void pointer
arg - integer argument
Return:
0 - No errors
virtual int get_rx_char(unsigned char & from_buf) = 0;
Get received data from serial line RX buffer, CHAPI serial line must provide RX buffer.
from_buf - place to put received char
Return: note
1 - No errors, you have got 1 received char
-1 - No received char, serial line RX buffer is empty
int ctrl_rx_done(unsigned int len);
Wrapper for calling CHAPI serial line controller’s callback function, serial line must call
function ctrl_rx_done(...) to notify controller about received data.
len - number of received data
Return:
0 - No errors
int ctrl_tx_done(unsigned int len);
Wrapper for calling CHAPI serial line controller’s callback function, serial line must call
function ctrl_tx_done(...) to notify controller about completion of send operation.
len - number of sent data
Return :
0 - No errors
int ctrl_get_tx_char(unsigned char & from_buf);
Wrapper for calling CHAPI serial line controller’s callback function, serial line must call
function ctrl_get_tx_char(...) to get data for transmission from serial line controller’s TX
buffer.
Note: CHAPI serial line controller must provide TX buffer.
from_buf - place to put char for transmission