Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
Software for White Rabbit PTP Core
Commits
ebe5d640
Commit
ebe5d640
authored
Mar 29, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: use udev-computed USB when called ertm_init(NULL)
parent
b5bce434
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
libertm.c
libertm/libertm.c
+1
-3
No files found.
libertm/libertm.c
View file @
ebe5d640
...
...
@@ -192,7 +192,6 @@ struct ertm_lib_version *ertm_lib_version(void)
}
/* constants of nature for this design */
static
char
*
usb_serial
=
"/dev/ttyUSB2"
;
static
int
serial_speed
=
8
*
115200
;
static
int
get_version_info
(
struct
ertm_status
*
st
,
...
...
@@ -212,14 +211,13 @@ struct ertm_status *ertm_init(const char *address)
errno
=
ENOMEM
;
return
NULL
;
}
/* FIXME: this has to be parameterized */
if
((
address
==
NULL
)
&&
((
address
=
ertm_find_usb_port
())
==
NULL
))
{
errno
=
ENODEV
;
return
NULL
;
}
memcpy
(
&
st
->
connection
.
serial_connection
,
address
,
strlen
(
address
));
err
=
uart_link_create_linux
(
&
st
->
link
,
usb_serial
,
serial_speed
);
err
=
uart_link_create_linux
(
&
st
->
link
,
address
,
serial_speed
);
if
(
err
!=
0
)
{
errno
=
ENODEV
;
return
NULL
;
...
...
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