I'm writing some embedded code for use on a Ultra Sparc 1, and
the bpp0 port appears to not be working. I'm not sure if my C code is bad, or
if Sun's docs are wrong, but when I open the file and write to it, nothing
happens on the port.
I've tried opening the file /dev/bpp0 with both a FILE and an int file pointer,
and
get different results.
#define BPP;
char buffer[];
FILE *ffp;
ffp=fopen(BPP,"w");
fwrite(buffer,1,1,ffp);
The fopen returns a valid pointer, as do the fwrite commands (errno is 0),
but nothing happens at the port (I've got a logic analyzer sitting there
monitoring it.)
int *fp;
fp=open(BPP,O_WRONLY);
write(fp,buffer,1);
The open returns a valid pointer. The write command hangs my terminal.
If anyone has any suggestions as to what I'm doing wrong, I'd appreciate the
advice.
Thanks,
Bob Luking