[TriLUG] C linux programming question

Greg Brown gregbrown at mindspring.com
Fri May 23 20:57:37 EDT 2003


Hey all.  Is it possible, using C, to monitor voltage on one pin of a 
serial port when voltage is supplied from an outside source or do I 
have to knuckle under and learn some assembly for this task?  What I'm 
after here is with an embedded linux machine mounted in a car and I 
want to have power supplied by an always-on supply in the car.  I'd 
also like to have a pin on a serial port connected to a "only on when 
running" wire (somehow).  So when the voltage drops to zero on the 
"only on when running" pin the embedded device will shut itself down 
automatically (the device would be turned on manually via an "on" 
button).

Is this theoretically possible using C?

Greg




More information about the TriLUG mailing list