[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: AW: [DDL-ML] Programmiergleis



Hallo Torsten

> Torsten Vogt schrieb:
>
> > Mal 'ne dumme Frage: Diesen divisor 7 muesste man doch auch mit
> > ioctl() setzen koennen.
>
> Ich versuche mir mal die Antwort selbst zu geben:
>
> Wuerde folgendes funktionieren?
>
> // NMRA Modus:
> struct serial_struct serinfo;
> ioctl(COM_DEVICE, TIOCGSERIAL, &serinfo);
> serinfo.custom_divisor = 7;
> ioctl(COM_DEVICE, TIOCSSERIAL, &serinfo);
>
> // Maerklin Modus:
> struct serial_struct serinfo;
> ioctl(COM_DEVICE, TIOCGSERIAL, &serinfo);
> serinfo.custom_divisor = 1;
> ioctl(COM_DEVICE, TIOCSSERIAL, &serinfo);
>
>
> Torsten
>
Iwould like to check this with the code in setserial but till now I haven't
found the sources yet. Are they on the Suse linux distribution? And if so
which package.
This would help me.

Gegroet Rob Nieuwland.