gpio (General Purpose Input and Outut)

Utility to manipulate the GPIO registers of a device running an embedded linux
distribution such as busybox. On the Linksys WRT router, this utility can be
used to turn on and off the front panel LEDs and also turn on and off the bright
CISCO amber and white light as well as detect and monitor the button's state.

I have modified the source code so that the state of a GPIO can be immediately
returned as an error level and echoed to STDIO. The original verison only has
a monitor state which requires interaction and CTRL+C to terminate.

gpio.zip

--------------------------------------------------------------------------------

usleep

Micro Sleep (µsleep)

Allows you to specify sleep time in milliseconds, the normal sleep command only
allows a minimum of 1 second (=1000 milliseconds). This utility is useful to
combine with GPIOX to create flashing light for monitoring SSH connections or
alerting to other states for security or CPU load.

usleep.zip


#include 
#include 
int main(int argc, char* argv[]) {
	long wait;
	if(argc>1) {
		wait = atol(argv[1]);
		wait *= 1000;
		usleep(wait);
	} else {
		printf("Usage:\n\tusleep \n");
	}
}