Subject: programming serial port
To: None <port-macppc@NetBSD.org>
From: Tomas D <u0giene@yahoo.com>
List: port-macppc
Date: 01/13/2007 09:59:36
Hi,=0AI'm trying to find some info on how to do basic programming on mac se=
rial port. =0AI came up with the followin algorithm=0Aset pin1 high=0A|=0Ac=
heck if pin2 is high=0A         |=0A        / \ =0AHigh     Low -> go to ch=
eck if pin2 is high=0A|=0Awrite character to a file -> go to check if pin2 =
is high=0A=0Apin1 and pin2 are connected to a shaft sensor which gives n am=
ount of short circuits in 1 revolution=0A=0Apin1=0A  |=0A =3D=3D shaft sens=
or=0A  |=0Apin2=0A=0Auname (just in case)=0A[wally@macppc ~]$ uname -a=0ANe=
tBSD macppc 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:25:38 UTC 2005  buil=
ds@b2.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/macppc/200512182024Z-ob=
j/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/macppc/compile/GENERIC mac=
ppc=0A=0A=0AThanks everyone for your ideas=0A=0A=0A =0A____________________=
________________________________________________________________=0AYahoo! M=
usic Unlimited=0AAccess over 1 million songs.=0Ahttp://music.yahoo.com/unli=
mited