By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

parallel programming in linux

P: n/a
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);
}

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
iv***********@gmail.com 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
Jul 23 '05 #2

P: n/a
thank you. I though this was right...

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.