EtherCAT Virtual TTY Interface


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_tectty_create (const ec_tty_operations_t *ops, void *cb_data)
 Create a virtual TTY interface.
void ectty_free (ec_tty_t *tty)
 Releases a virtual 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.
void ectty_rx_data (ec_tty_t *tty, const uint8_t *buffer, size_t size)
 Pushes received data to the TTY interface.

Typedef Documentation

typedef struct ec_tty ec_tty_t

See also:
ec_tty

Definition at line 52 of file ectty.h.


Function Documentation

ec_tty_t* ectty_create ( const ec_tty_operations_t ops,
void *  cb_data 
)

Create a virtual TTY interface.

Parameters:
ops Set of callbacks.
cb_data Arbitrary data, that is passed to any callback.
Returns:
Pointer to the interface object, otherwise an ERR_PTR value.

void ectty_free ( ec_tty_t tty  ) 

Releases a virtual TTY interface.

Parameters:
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.

Returns:
Number of bytes copied.
Parameters:
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.

Parameters:
tty  TTY interface.
buffer  Buffer with received data.
size  Number of bytes in buffer.


Generated on Mon Jun 20 09:31:31 2016 for IgH EtherCAT Master by  doxygen 1.5.6