Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
8c32932e
Commit
8c32932e
authored
Apr 14, 2016
by
Grzegorz Daniluk
Committed by
Adam Wujek
Apr 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools/wrs_auxclk: (non-technical) cleanup, checkpatch.pl on the file
parent
db042c71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
wrs_auxclk.c
userspace/tools/wrs_auxclk.c
+27
-27
No files found.
userspace/tools/wrs_auxclk.c
View file @
8c32932e
...
...
@@ -16,11 +16,11 @@
#define OPT_PPSHIFT 6
/* default parameters to generate 10MHz signal */
#define DEF_FREQ
10
#define DEF_DUTY
0.5
#define DEF_CSHIFT
30
#define DEF_SIGDEL
0
#define DEF_PPSHIFT
0
#define DEF_FREQ 10
#define DEF_DUTY 0.5
#define DEF_CSHIFT 30
#define DEF_SIGDEL 0
#define DEF_PPSHIFT 0
#define MAX_FREQ 250
/* min half-period is 2ns */
#define MIN_FREQ 0.004
/* max half-period is 65535*2ns */
...
...
@@ -40,7 +40,7 @@ struct option ropts[] = {
{
"cshift"
,
1
,
NULL
,
OPT_CSHIFT
},
{
"sigdel"
,
1
,
NULL
,
OPT_SIGDEL
},
{
"ppshift"
,
1
,
NULL
,
OPT_PPSHIFT
},
{
0
,}};
{
0
,}
};
/*******************/
/* data structures */
...
...
@@ -142,27 +142,27 @@ int main(int argc, char *argv[])
exit
(
1
);
}
while
(
(
c
=
getopt_long
(
argc
,
argv
,
"h"
,
ropts
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
OPT_FREQ
:
req
.
freq_mhz
=
(
float
)
atof
(
optarg
);
break
;
case
OPT_DUTY
:
req
.
duty
=
(
float
)
atof
(
optarg
);
break
;
case
OPT_CSHIFT
:
req
.
cshift_ns
=
atoi
(
optarg
);
break
;
case
OPT_SIGDEL
:
req
.
sigdel_taps
=
atoi
(
optarg
);
break
;
case
OPT_PPSHIFT
:
req
.
ppshift_taps
=
atoi
(
optarg
);
break
;
case
OPT_HELP
:
default:
print_help
(
prgname
);
return
1
;
while
(
(
c
=
getopt_long
(
argc
,
argv
,
"h"
,
ropts
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
OPT_FREQ
:
req
.
freq_mhz
=
(
float
)
atof
(
optarg
);
break
;
case
OPT_DUTY
:
req
.
duty
=
(
float
)
atof
(
optarg
);
break
;
case
OPT_CSHIFT
:
req
.
cshift_ns
=
atoi
(
optarg
);
break
;
case
OPT_SIGDEL
:
req
.
sigdel_taps
=
atoi
(
optarg
);
break
;
case
OPT_PPSHIFT
:
req
.
ppshift_taps
=
atoi
(
optarg
);
break
;
case
OPT_HELP
:
default:
print_help
(
prgname
);
return
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment