1 |
G'day, |
2 |
|
3 |
I'm porting some old DOS code to Linux for a medical device that is |
4 |
being upgraded. Among other goodies, it has a sensor that sends data at |
5 |
115KB to an onboard NS16550A (or equivalent). |
6 |
|
7 |
The sensor is controlled (in part) by setting RTS on and off. I looked |
8 |
high and low (pun intended) for an ioctl or similar call that would |
9 |
allow this level of control and couldn't find anything. I finally ended |
10 |
up using the ollowing lines of code: |
11 |
|
12 |
outb(inportb(MCR) | 0x02, MCR); //DTR,RTS=ON |
13 |
outb(inportb(MCR) & ~0x02, MCR); //DTR=ON,RTS=OFF |
14 |
|
15 |
Directly tweaking the I/O port runs against the grain, but it's the |
16 |
only thing I've found that works. |
17 |
|
18 |
Is there a better way to control the chip? |
19 |
|
20 |
Regards, |
21 |
|
22 |
David |