mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-06 03:41:52 +08:00
alloc_tty_driver was deprecated by tty_alloc_driver in commit 7f0bc6a68ed9 (TTY: pass flags to alloc_tty_driver) in 2012 but first in kernel v5.15 it has been dropped (56ec5880a28e). Switch to tty_alloc_driver when using kernels >= v5.15 As of v5.15, the put_tty_driver alias has been dropped in favor of directly calling tty_driver_kref_put (9f90a4ddef4e). Switch to tty_driver_kref_put when using kernels >= v5.15 As from v5.14 the write_room (03b3b1a2405c) and chars_in_buffer (fff4ef17a940) methods' return type changed from int to unsigned int in struct tty_operations. This has impact on ec_tty_write_room() and ec_tty_chars_in_buffer().
$Id$ vim700: spelllang=en spell Virtual TTY interface driver for EtherCAT slave supporting serial comm Quick installation guide: ./configure --with-linux-dir=/your/linux/directory --enable-tty make all modules make modules_install install rcethercat start insmod tty/ec_tty.ko insmod examples/tty/ec_tty_example.ko The default settings for the serial line are 9600 8 N 1. The tty example operates a Beckhoff EL6002 at ring position 1. For a short test, connect port X1 with a serial port via null modem cable. If a minicom is started on that port and the below command is entered, the output should be visible in minicom: echo "Hello World" > /dev/ttyEC0 Have a lot of fun!