Index: uisp-20050207/src/Main.C =================================================================== --- uisp-20050207/src/Main.C 2004-12-28 06:39:38.000000000 -0800 +++ uisp-20050207/src/Main.C 2007-02-09 01:08:44.000000000 -0800 @@ -215,6 +215,10 @@ const char* GetCmdParam(const char* argv } } } + if ( strncmp( argv_name, "-dprog", argv_name_len ) == 0 ) { + // No programmer specified, pick a default. + return "bsd"; + } return NULL; } @@ -235,13 +239,15 @@ int main(int _argc, const char* _argv[]) argc = _argc; argv = _argv; verbose_level=1; - + +#if 0 if (argc==1){ Info(0, "%s: No commands specified. " "Try '%s --help' for list of commands.\n", argv[0], argv[0]); exit(1); - } + } +#endif argv_ok = (char *)malloc(argc); for (int i=1; i #include +#include + +#define ROBOSTIX_IOCTL_MAGIC 'R' +#define ROBOSTIX_CMD_DELAY_USEC 0x8A +#define ROBOSTIX_IOCTL_DELAY_USEC _IO( ROBOSTIX_IOCTL_MAGIC, ROBOSTIX_CMD_DELAY_USEC ) // arg is int + +#define usleep(t) ioctl( ppdev_fd, ROBOSTIX_IOCTL_DELAY_USEC, t ) + #ifndef NO_DIRECT_IO /* Linux and FreeBSD differ in the order of outb() arguments. @@ -119,7 +127,6 @@ #endif /* NO_DIRECT_IO */ -#include #include #include "timeradd.h" @@ -352,6 +359,9 @@ TDAPA::SckDelay() void TDAPA::Delay_usec(long t) { +#if 1 + usleep( t ); +#else struct timeval t1, t2; #if defined(__CYGWIN__) @@ -371,6 +381,7 @@ TDAPA::Delay_usec(long t) do { gettimeofday(&t2, NULL); } while (timercmp(&t2, &t1, <)); +#endif } void @@ -1076,7 +1087,7 @@ TDAPA::TDAPA(): and can suffer the consequences. Joe user should not be told about ioperm failure due to permission denied. */ - const char *ppdev_name = "/dev/parport0"; + const char *ppdev_name = "/dev/robostix"; sck_invert = 0; mosi_invert = 0;