Darren Bilby (darren@neo.co.nz)
Wed, 17 Nov 1999 14:34:13 +1300
Argh, serves me right for spending the last year coding in Pascal, making
newbie C mistakes all over the place =)
With the changes "write" isn't ever completing, checking dmesg I'm getting
parport0: FIFO is stuck
Checking with the oscilliscope I'm pretty sure it's putting the data out,
then doing a strobe, but theres something dodgy going on and there seems to
be a long timeout. I have a strong feeling my custom board may be the
problem and not the parport code.
I'll get back to you when I've checked the board out. Before I go hacking
around adding debug stuff to the parport code and harrassing my engineer,
any info you can give me on what FIFO is stuck actually means? could it be a
dodgy port on my motherboard?
Thanks heaps
Darren
-----Original Message-----
From: Tim Waugh [mailto:twaugh@redhat.com]
Sent: Tuesday, November 16, 1999 11:39 PM
To: Darren
Cc: linux-parport@torque.net
Subject: Re: [PARPORT] ECP mode in 2.3
On Mon, 15 Nov 1999, Darren wrote:
> I thought the parport should be doing the strobe lines in hardware,
> what am I doing wrong here? any advice?
Yes, it will do the handshake in hardware if you tell it to, but that's
not what you've done. I know that there is no documentation for ppdev or
parport, and it's something I'm working on now.
Here's what you need to change:
> char *str, *c;
> [...]
> strcpy(str, "Hello World\n");
You probably meant const char *str = "Hello World\n" here.
> for(i=0;i<1000;i++){
> for (; str; str++){
> if (ioctl (fd, PPWDATA, &str)) {
> printf ("Couldn't write data\n");
> return 1;
> }
Instead of this loop you want:
write (fd, str, strlen (str));
By the way, the PPCLAIM after the PPEXCL _is_ necessary: PPEXCL just means
that when you claim, you will want exclusive access. It doesn't claim
right away.
Does that help?
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Tue 16 Nov 1999 - 20:32:28 EST