L
ok!habe ich!ich habe es zur zeit so gelöst aber ich will es nun mit dem links shift und rechts shift machen.
#include <stdio.h>
#include <string.h>
#include <sys/io.h>
#include <unistd.h>
#define D_LPT1_DATA 0x378
int main( int argc, char *argv[] )
{
int I_port;
char *pC_port;
I_port = D_LPT1_DATA;
if ( ioperm( I_port, 3, 1) != 0 ) { /* get IO/perm */
perror( "ERROR: Kann LPT Device nicht öffnen,da es gerade verwendet wird." );
return(-1);
}
outb( 0x00, I_port );
printf( "\nProgramm wurde gestartet. Mit STRG+C wir das Programm beendet.\n\n",
pC_port );
printf( "Start: " ), fflush ( stdout);
while( 1==1 ) {
outb( 0x1, I_port );
printf( "1-" ), fflush ( stdout);
usleep( 1*70*1000 );
outb( 0x2, I_port );
printf( "2-" ), fflush ( stdout);
usleep( 1*70*1000 );
outb( 0x4, I_port );
printf( "3-" ), fflush ( stdout);
usleep( 1*70*1000 );
outb( 0x8, I_port );
printf( "4 -- " ), fflush ( stdout);
usleep( 1*70*1000 );
}
return ( 0 );
}