edpuchta
01-19-2003, 05:08 PM
hello!
I am with a doubt, when sending a byte for the parallel port the byte is in the bolts only some microseconds, but when I go to read way software I read only buffer(and the byte is there).
The documentation I caught of www.linuxdoc.org
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <asm/io.h>
#define base 0x378 /* printer port base address */
void setbite(int valor)
{
while(ab != 1)
{
outb(valor,base);
}
}
void main(void)
{
if(ioperm(base,1,1))
{
fprintf(stderr, "Error: Couldn't get the port at %x\n", base), exit(1);
}
printf("digite um valor: ");
scanf("%d", &valor);
setbite(valor);
usleep(500000); //500ms
}
What I want to make is that when sending the byte it is in the port.
what I can make to function?
I am with a doubt, when sending a byte for the parallel port the byte is in the bolts only some microseconds, but when I go to read way software I read only buffer(and the byte is there).
The documentation I caught of www.linuxdoc.org
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <asm/io.h>
#define base 0x378 /* printer port base address */
void setbite(int valor)
{
while(ab != 1)
{
outb(valor,base);
}
}
void main(void)
{
if(ioperm(base,1,1))
{
fprintf(stderr, "Error: Couldn't get the port at %x\n", base), exit(1);
}
printf("digite um valor: ");
scanf("%d", &valor);
setbite(valor);
usleep(500000); //500ms
}
What I want to make is that when sending the byte it is in the port.
what I can make to function?