[fpc-pascal] Serial port access on Darwin PPC
brad at wasp.net.au
Tue Sep 23 12:51:49 CEST 2008
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
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
Linux for PowerPC
Mac OS for PowerPC
Darwin for PowerPC
NetBSD for PowerPC (under development)
AmigaOS for PowerPC
Supported CPU instruction sets:
Supported FPU instruction sets:
Obviously I'm doing something dumb, I just don't know how to debug it. No strace on MacOS.
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
More information about the fpc-pascal