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

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



Hallo Torsten

> 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
>
Im not sure that the default of the divisor is set to 1.
I cann't make this up from the sources of setserial and if I do a setserial
on my PC it gives for the divisor 0.
Perhaps it is better to get the default divisor first and store it
somewhere.
Just to be on the save side.
I think I have to look deeper in the sources of serial.

Groetjes Rob Nieuwland