1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2025-04-21 12:27:27 +03:00

ubb-patgen/ubb-patgen.c: new option -I inter_s to select "unsafe" frequencies

This commit is contained in:
Werner Almesberger
2013-01-28 21:20:25 -03:00
parent 04b235cedf
commit 128590bee0
2 changed files with 12 additions and 8 deletions

View File

@@ -691,9 +691,9 @@ static void usage(const char *name)
{
fprintf(stderr,
"usage: %s\n"
" %s [-q] (-f|-F) freq_hz|-i interval_s\n"
" %s [-q] [(-f|-F) freq_hz|-i interval_s] -c [active_s]\n"
" %s [-q] [(-f|-F) freq_hz|-i interval_s]\n"
" %s [-q] (-f|-F) freq_hz|(-i|-I) interval_s\n"
" %s [-q] [(-f|-F) freq_hz|(-i|-I) interval_s] -c [active_s]\n"
" %s [-q] [(-f|-F) freq_hz|(-i|-I) interval_s]\n"
" [-C|-t 0|1... [-d debounce_s]] [-w wait_s] [-m mask] [-p]\n"
" file|pattern\n\n"
" -c output bus clock on CLK without sending a pattern\n"
@@ -703,6 +703,7 @@ static void usage(const char *name)
" -F freq_hz like -f, but also allow \"overclocking\"\n"
" -i inter_s set bus clock such that one cycle equals the specified "
"interval\n"
" -I inter_s like -i, but also allow \"overclocking\"\n"
" -m mask use only the DATx lines specified in the mask (default: 0xf)\n"
" -p force interpretation of argument as pattern (and not file)\n"
" -q quiet. Don't pretty-print frequencies; don't report clock\n"
@@ -749,7 +750,7 @@ int main(int argc, char **argv)
unsigned long tmp;
const char *p;
while ((c = getopt(argc, argv, "cCd:f:F:i:m:pqt:w:")) != EOF)
while ((c = getopt(argc, argv, "cCd:f:F:i:I:m:pqt:w:")) != EOF)
switch (c) {
case 'c':
clk_only = 1;
@@ -772,6 +773,9 @@ int main(int argc, char **argv)
if (!frequency(optarg, &bus_hz, &bus_rel))
usage(*argv);
break;
case 'I':
all = 1;
/* fall through */
case 'i':
if (!interval(optarg, &bus_hz, &bus_rel))
usage(*argv);