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

Re: [MiNT] ioctl.h



On Mon, 2005-10-10 at 19:53 +0200, Peter Slegg wrote:
> I am trying to compile a Linux application for dowloading
> data from a Suunto dive computer.

You'll likely have to know some details about what hardware serial
signals it needs.  If its standard RTS/CTS, then you can just turn that
on and comment out the code that doesn't work.  If it uses something
stranger, it might be easier to make a cable to swap a few control lines
around.

> TIOCMSET isn't found. I expected to find it in ioctl.h where
> TIOCMGET is defined.

TIOCMGET retrieves the status of serial port signals, and TIOCMSET will
set them, such as DTR and RTS.  MiNT has the first (but only a hack -
may not work on anything but the first serial port) as part of
Ssystem(), but not the second at all.

> Is there much I can do about this ?

I don't think so.  I don't believe mint supports these itself.  You'd
likely have to replace the call with something Atari specific. The
situation looks grim as far as getting instant access to the state of
the serial control signals.  Just hacking the source to your app as a
work-around and faking whatever its trying to do signal-wise may be
easier.  Supporting this properly looks like it would require changing
the drivers to actually query the hardware registers for the
information, adding an OS calls to get it, adding a mintlib function to
call the OS, etc.

Not even sure if booting Linux would get you closer since you can't be
guaranteed that the serial drivers support the call under m68k-linux
anyway.

-- Evan