Dingoonity.org

Dingux (Dingoo Linux) => Development => Topic started by: RodrigoCard on December 25, 2010, 12:48:18 am

Title: How do I detect if the USB cable is plugged in? and charging?
Post by: RodrigoCard on December 25, 2010, 12:48:18 am
That is it!

I want to detect if the USB cable is plugged in and if it is charging the batteries.
Is there any way to acomplish this?

thanks!  :)
Title: Re: How do I detect if the USB cable is plugged in? and charging?
Post by: RodrigoCard on January 05, 2011, 11:04:22 pm
Well... may I have to look for some GPIO or something like that? How can I read a GPIO pin?
Title: Re: How do I detect if the USB cable is plugged in? and charging?
Post by: darfgarf on January 06, 2011, 07:16:11 am
The gpio pins aren't hard to read, mapped to /sys/jz somewhere, someone in the inc channel will know off the top of their head.  Gpio documentation is on the dingoo-linux googlecode wiki, think I saw something about usb, though there's probably a better way of seeing, could just ping 10.1.0.1 or whatever the computers up is over the usb