mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-27 15:41:53 +02:00
ubb-patgen/ubb-patgen.c: new option -I inter_s to select "unsafe" frequencies
This commit is contained in:
parent
04b235cedf
commit
128590bee0
@ -63,10 +63,6 @@ bus clk = 100.962 kHz (+0.96%)
|
|||||||
|
|
||||||
This warning can be suppressed with the option -q.
|
This warning can be suppressed with the option -q.
|
||||||
|
|
||||||
The option -F works like -f but also allows frequencies that may
|
|
||||||
exceed the hardware's capabilities. As a consequence, the MMC
|
|
||||||
controller may hang.
|
|
||||||
|
|
||||||
The frequency can also be specified as the cycle time with the
|
The frequency can also be specified as the cycle time with the
|
||||||
option -i:
|
option -i:
|
||||||
|
|
||||||
@ -75,6 +71,10 @@ option -i:
|
|||||||
The meaning of an appended + or - changes here, e.g., 10us+
|
The meaning of an appended + or - changes here, e.g., 10us+
|
||||||
selects a slower clock (producing an interval of at least 10 us).
|
selects a slower clock (producing an interval of at least 10 us).
|
||||||
|
|
||||||
|
The options -F and -I work like -f and -i but also allows
|
||||||
|
frequencies that may exceed the hardware's capabilities. As a
|
||||||
|
consequence, the MMC controller may hang.
|
||||||
|
|
||||||
|
|
||||||
Clock output
|
Clock output
|
||||||
------------
|
------------
|
||||||
|
@ -691,9 +691,9 @@ static void usage(const char *name)
|
|||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s\n"
|
"usage: %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 interval_s] -c [active_s]\n"
|
" %s [-q] [(-f|-F) freq_hz|(-i|-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"
|
||||||
" [-C|-t 0|1... [-d debounce_s]] [-w wait_s] [-m mask] [-p]\n"
|
" [-C|-t 0|1... [-d debounce_s]] [-w wait_s] [-m mask] [-p]\n"
|
||||||
" file|pattern\n\n"
|
" file|pattern\n\n"
|
||||||
" -c output bus clock on CLK without sending a pattern\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"
|
" -F freq_hz like -f, but also allow \"overclocking\"\n"
|
||||||
" -i inter_s set bus clock such that one cycle equals the specified "
|
" -i inter_s set bus clock such that one cycle equals the specified "
|
||||||
"interval\n"
|
"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"
|
" -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"
|
" -p force interpretation of argument as pattern (and not file)\n"
|
||||||
" -q quiet. Don't pretty-print frequencies; don't report clock\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;
|
unsigned long tmp;
|
||||||
const char *p;
|
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) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
clk_only = 1;
|
clk_only = 1;
|
||||||
@ -772,6 +773,9 @@ int main(int argc, char **argv)
|
|||||||
if (!frequency(optarg, &bus_hz, &bus_rel))
|
if (!frequency(optarg, &bus_hz, &bus_rel))
|
||||||
usage(*argv);
|
usage(*argv);
|
||||||
break;
|
break;
|
||||||
|
case 'I':
|
||||||
|
all = 1;
|
||||||
|
/* fall through */
|
||||||
case 'i':
|
case 'i':
|
||||||
if (!interval(optarg, &bus_hz, &bus_rel))
|
if (!interval(optarg, &bus_hz, &bus_rel))
|
||||||
usage(*argv);
|
usage(*argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user