[fpc-pascal] Serial port access on Darwin PPC
Brad Campbell
brad at wasp.net.au
Tue Sep 23 12:51:49 CEST 2008
G'day all,
Can any Mac people tell me why
FHandle := fpOpen(Port, O_RDWR or O_NOCTTY);
(Where FHandle is a longint and port is '/dev/tty.usbserial-A400379A')
.. just locks up waiting ? (I've tried it on two Mac PPC machines now, both cross-compiled from my
linux x86 install, and compiled natively on the MacOS box)
macppc:~/Pascal/Proploader user$ whoami
user
macppc:~/Pascal/Proploader user$ ls -la /dev/tty.usbserial-A400379A
crw-rw-rw- 1 root wheel 9, 2 Sep 23 14:45 /dev/tty.usbserial-A400379A
I can put O_NONBLOCK in there and it will open, but then I have all sorts of problems talking to it.
I really want it to block.
This works on Linux x86 and PPC, but this is the first time I've strayed into MacOS land.
Free Pascal Compiler version 2.2.3
Compiler Date : 2008/06/14
Compiler CPU Target: powerpc
Supported targets:
Linux for PowerPC
Mac OS for PowerPC
Darwin for PowerPC
NetBSD for PowerPC (under development)
MorphOS
AmigaOS for PowerPC
Supported CPU instruction sets:
604
750
7400
970
Supported FPU instruction sets:
SOFT
STANDARD
Supported Optimizations:
REGVAR
LOOPUNROLL
TAILREC
Obviously I'm doing something dumb, I just don't know how to debug it. No strace on MacOS.
Regards,
Brad
--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
More information about the fpc-pascal
mailing list