Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
TDC core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
TDC core
Commits
cc8cc94f
Commit
cc8cc94f
authored
Oct 26, 2011
by
Sebastien Bourdeauducq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo: dump raw measurements
parent
ba44ce28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
main.c
demo/software/demo/main.c
+1
-0
tdc.c
demo/software/demo/tdc.c
+17
-0
tdc.h
demo/software/demo/tdc.h
+1
-0
No files found.
demo/software/demo/main.c
View file @
cc8cc94f
...
@@ -221,6 +221,7 @@ static void do_command(char *c)
...
@@ -221,6 +221,7 @@ static void do_command(char *c)
/* payload */
/* payload */
else
if
(
strcmp
(
token
,
"rofreq"
)
==
0
)
rofreq
();
else
if
(
strcmp
(
token
,
"rofreq"
)
==
0
)
rofreq
();
else
if
(
strcmp
(
token
,
"calinfo"
)
==
0
)
calinfo
();
else
if
(
strcmp
(
token
,
"calinfo"
)
==
0
)
calinfo
();
else
if
(
strcmp
(
token
,
"mraw"
)
==
0
)
mraw
();
else
if
(
strcmp
(
token
,
""
)
!=
0
)
else
if
(
strcmp
(
token
,
""
)
!=
0
)
printf
(
"Command not found
\n
"
);
printf
(
"Command not found
\n
"
);
...
...
demo/software/demo/tdc.c
View file @
cc8cc94f
...
@@ -93,3 +93,20 @@ void calinfo()
...
@@ -93,3 +93,20 @@ void calinfo()
tdc
->
DCTL
=
0
;
tdc
->
DCTL
=
0
;
}
}
void
mraw
()
{
if
(
!
(
tdc
->
CS
&
TDC_CS_RDY
))
{
printf
(
"Startup calibration not done
\n
"
);
return
;
}
tdc
->
EIC_IER
=
TDC_EIC_IER_IE0
;
while
(
1
)
{
while
(
!
(
tdc
->
EIC_ISR
&
TDC_EIC_ISR_IE0
))
{
if
(
readchar_nonblock
())
return
;
}
printf
(
"%d[%d]
\n
"
,
tdc
->
RAW0
,
tdc
->
POL
&
0x01
);
tdc
->
EIC_ISR
=
TDC_EIC_ISR_IE0
;
}
}
demo/software/demo/tdc.h
View file @
cc8cc94f
...
@@ -21,5 +21,6 @@
...
@@ -21,5 +21,6 @@
void
rofreq
();
void
rofreq
();
void
calinfo
();
void
calinfo
();
void
mraw
();
#endif
/* __TDC_H */
#endif
/* __TDC_H */
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