Re: [fpc-pascal] Serial port access on Darwin PPC

2008-09-23 Thread Brad Campbell
Jonas Maebe wrote: On 23 Sep 2008, at 14:24, Brad Campbell wrote: tios.c_cflag is used to obtain the baudrate constant, but it's not then cleared before or'ing the other constants into it. Strangely enough this works on linux x86, but breaks badly in MacOS PPC. Uninitialised data often caus

Re: [fpc-pascal] Serial port access on Darwin PPC

2008-09-23 Thread Jonas Maebe
On 23 Sep 2008, at 14:24, Brad Campbell wrote: tios.c_cflag is used to obtain the baudrate constant, but it's not then cleared before or'ing the other constants into it. Strangely enough this works on linux x86, but breaks badly in MacOS PPC. Uninitialised data often causes bugs like this.

Re: [fpc-pascal] Serial port access on Darwin PPC

2008-09-23 Thread Brad Campbell
Jonas Maebe wrote: On 23 Sep 2008, at 12:51, Brad Campbell wrote: 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 ? No, I can't tell you why this happens. Does the sa

Re: [fpc-pascal] Serial port access on Darwin PPC

2008-09-23 Thread Jonas Maebe
On 23 Sep 2008, at 12:51, Brad Campbell wrote: 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 ? No, I can't tell you why this happens. Does the same happen if you do

[fpc-pascal] Serial port access on Darwin PPC

2008-09-23 Thread Brad Campbell
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 nativ