Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
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
White Rabbit Trigger Distribution
Commits
7ba9936f
Commit
7ba9936f
authored
Jun 20, 2019
by
Dimitris Lampridis
Committed by
Dimitris Lampridis
Jun 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: fix uninitialized pointer
parent
b8038975
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
wrtd-adcout.c
software/firmware/adc/wrtd-adcout.c
+4
-4
wrtd-fd.c
software/firmware/fd/wrtd-fd.c
+8
-8
No files found.
software/firmware/adc/wrtd-adcout.c
View file @
7ba9936f
...
...
@@ -106,7 +106,7 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
struct
adcout_out_queue
*
q
=
&
dev
->
queue
;
struct
wrtd_event
*
ev
=
adcout_out_queue_front
(
q
);
uint32_t
ctrl
=
adcout_readl
(
dev
,
ALT_TRIGIN_CTRL
);
struct
wrtd_tstamp
*
ts
;
struct
wrtd_tstamp
ts
;
/* Check if the output has triggered */
if
(
!
dev
->
idle
)
{
...
...
@@ -155,14 +155,14 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
wrtd_log
(
WRTD_LOG_MSG_EV_CONSUMED
,
WRTD_LOG_CONSUMED_START
,
NULL
,
ev
,
NULL
);
ts_add3_ns
(
ts
,
&
ev
->
ts
,
8000
);
ts_add3_ns
(
&
ts
,
&
ev
->
ts
,
8000
);
/*
* Store the last programmed timestamp (+ some margin) and mark
* the output as busy
*/
q
->
last_programmed_sec
=
ts
->
seconds
;
q
->
last_programmed_ns
=
ts
->
ns
;
q
->
last_programmed_sec
=
ts
.
seconds
;
q
->
last_programmed_ns
=
ts
.
ns
;
dev
->
idle
=
0
;
}
...
...
software/firmware/fd/wrtd-fd.c
View file @
7ba9936f
...
...
@@ -198,7 +198,7 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
struct
lrt_pulse_queue
*
q
=
&
out
->
queue
;
struct
wrtd_event
*
ev
=
pulse_queue_front
(
q
);
uint32_t
dcr
=
fd_ch_readl
(
out
,
FD_REG_DCR
);
struct
wrtd_tstamp
*
ts
;
struct
wrtd_tstamp
ts
;
/* Check if the output has triggered */
if
(
!
out
->
idle
)
{
...
...
@@ -242,11 +242,11 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
FD_REG_F_START
);
/* Adjust pulse width and program the output end time */
ts_add3_ns
(
ts
,
&
ev
->
ts
,
out
->
width_ns
);
ts_add3_ns
(
&
ts
,
&
ev
->
ts
,
out
->
width_ns
);
fd_ch_writel
(
out
,
ts
->
seconds
,
FD_REG_U_ENDL
);
fd_ch_writel
(
out
,
ts
->
ns
/
8
,
FD_REG_C_END
);
fd_ch_writel
(
out
,
((
ts
->
ns
&
7
)
<<
9
)
|
(
ts
->
frac
>>
(
32
-
9
)),
fd_ch_writel
(
out
,
ts
.
seconds
,
FD_REG_U_ENDL
);
fd_ch_writel
(
out
,
ts
.
ns
/
8
,
FD_REG_C_END
);
fd_ch_writel
(
out
,
((
ts
.
ns
&
7
)
<<
9
)
|
(
ts
.
frac
>>
(
32
-
9
)),
FD_REG_F_END
);
fd_ch_writel
(
out
,
0
,
FD_REG_RCR
);
fd_ch_writel
(
out
,
FD_DCR_MODE
,
FD_REG_DCR
);
...
...
@@ -257,14 +257,14 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
wrtd_log
(
WRTD_LOG_MSG_EV_CONSUMED
,
WRTD_LOG_CONSUMED_START
,
NULL
,
ev
,
NULL
);
ts_add2_ns
(
ts
,
8000
);
ts_add2_ns
(
&
ts
,
8000
);
/*
* Store the last programmed timestamp (+ some margin) and mark
* the output as busy
*/
out
->
last_programmed_sec
=
ts
->
seconds
;
out
->
last_programmed_ns
=
ts
->
ns
;
out
->
last_programmed_sec
=
ts
.
seconds
;
out
->
last_programmed_ns
=
ts
.
ns
;
out
->
idle
=
0
;
}
...
...
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