parallel programming in linux

Discussion in 'C++' started by iveqy.mailbox@gmail.com, Mar 25, 2005.

  1. Guest

    I don't get any output on pin 2. What's the problem?

    #include <stdio.h>
    #include <unistd.h>
    #include <sys/io.h>
    #include <stdlib.h>
    #include <iostream>

    #define BASEPORT 0x378

    using namespace std;


    int main()
    {
    if (ioperm(BASEPORT, 3, 1))
    {
    perror("ioperm");
    cout << "Error!" << endl;
    exit(1);
    }

    cout << "Light off\n";
    outb(0, BASEPORT);
    sleep(2);

    cout << "Light on\n";
    outb(1, BASEPORT);
    sleep(2);

    if (ioperm(BASEPORT, 3, 0))
    {
    perror("ioperm");
    cout << "Error" << endl;
    exit(1);
    }
    exit(0);
    }
     
    , Mar 25, 2005
    #1
    1. Advertising

  2. wrote:
    > I don't get any output on pin 2. What's the problem?


    The problem is wrong newsgroup. Try comp.os.linux.development.*
    hierarchy.

    > [...]


    V
     
    Victor Bazarov, Mar 25, 2005
    #2
    1. Advertising

  3. Guest

    thank you. I though this was right...
     
    , Mar 25, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soren
    Replies:
    4
    Views:
    1,301
    c d saunter
    Feb 14, 2008
  2. jurij
    Replies:
    6
    Views:
    340
    jurij
    Jun 14, 2008
  3. jurij
    Replies:
    7
    Views:
    786
    ivailosp
    Jul 4, 2008
  4. Vivek Menon
    Replies:
    5
    Views:
    3,408
    Paul Uiterlinden
    Jun 8, 2011
  5. Vivek Menon
    Replies:
    0
    Views:
    1,786
    Vivek Menon
    Jun 10, 2011
Loading...

Share This Page