IgH EtherCAT Master
1.6.2
|
Data Structures | |
struct | ec_tty_operations_t |
Operations on the virtual TTY interface. More... | |
Typedefs | |
typedef struct ec_tty | ec_tty_t |
Functions | |
ec_tty_t * | ectty_create (const ec_tty_operations_t *ops, void *cb_data) |
Create a virtual TTY interface. More... | |
void | ectty_free (ec_tty_t *tty) |
Releases a virtual TTY interface. More... | |
unsigned int | ectty_tx_data (ec_tty_t *tty, uint8_t *buffer, size_t size) |
Reads data to send from the TTY interface. More... | |
void | ectty_rx_data (ec_tty_t *tty, const uint8_t *buffer, size_t size) |
Pushes received data to the TTY interface. More... | |
ec_tty_t* ectty_create | ( | const ec_tty_operations_t * | ops, |
void * | cb_data | ||
) |
Create a virtual TTY interface.
ops | Set of callbacks. |
cb_data | Arbitrary data, that is passed to any callback. |
void ectty_free | ( | ec_tty_t * | tty | ) |
Releases a virtual TTY interface.
tty | TTY interface. |
unsigned int ectty_tx_data | ( | ec_tty_t * | tty, |
uint8_t * | buffer, | ||
size_t | size | ||
) |
Reads data to send from the TTY interface.
If there are data to send, they are copied into the buffer. At maximum, size bytes are copied. The actual number of bytes copied is returned.
tty | TTY interface. |
buffer | Buffer for data to transmit. |
size | Available space in buffer. |
void ectty_rx_data | ( | ec_tty_t * | tty, |
const uint8_t * | buffer, | ||
size_t | size | ||
) |
Pushes received data to the TTY interface.
tty | TTY interface. |
buffer | Buffer with received data. |
size | Number of bytes in buffer. |