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
7aa7aef1
Commit
7aa7aef1
authored
Jun 11, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usb-loader: fix error path and typo in 'make clean'
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
81250fc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
Makefile
usb-loader/Makefile
+1
-1
mch_flasher.c
usb-loader/mch_flasher.c
+6
-1
serial_linux.c
usb-loader/serial_linux.c
+2
-2
No files found.
usb-loader/Makefile
View file @
7aa7aef1
...
@@ -16,4 +16,4 @@ version.c: ../.git/HEAD ../.git/index
...
@@ -16,4 +16,4 @@ version.c: ../.git/HEAD ../.git/index
echo
""
>>
$@
echo
""
>>
$@
clean
:
clean
:
rm
-f
version.c
$(OBJS)
$(OUTPUT)
:q:q
rm
-f
version.c
$(OBJS)
$(OUTPUT)
usb-loader/mch_flasher.c
View file @
7aa7aef1
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdarg.h>
#include <string.h>
#include <string.h>
#include <errno.h>
#include <getopt.h>
#include <getopt.h>
#include <libgen.h>
#include <libgen.h>
...
@@ -609,7 +610,11 @@ main(int argc, char *argv[])
...
@@ -609,7 +610,11 @@ main(int argc, char *argv[])
printf
(
"n=%d, mode=%s, nFile=%d, serial=%s, (e=%d,c=%d,s=%d)
\n
"
,
argc
,
mode_str
,
nFile
,
serial_port
,
erase
,
check
,
scrub
);
printf
(
"n=%d, mode=%s, nFile=%d, serial=%s, (e=%d,c=%d,s=%d)
\n
"
,
argc
,
mode_str
,
nFile
,
serial_port
,
erase
,
check
,
scrub
);
serial_open
(
serial_port
,
PORT_SPEED
);
if
(
serial_open
(
serial_port
,
PORT_SPEED
)
<
0
)
{
fprintf
(
stderr
,
"%s: %s: %s
\n
"
,
argv
[
0
],
serial_port
,
strerror
(
errno
));
exit
(
1
);
}
fprintf
(
stderr
,
"Initializing SAM-BA: "
);
fprintf
(
stderr
,
"Initializing SAM-BA: "
);
samba_connect
(
board_rev
);
samba_connect
(
board_rev
);
...
...
usb-loader/serial_linux.c
View file @
7aa7aef1
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include <termios.h>
#include <termios.h>
#include <fcntl.h>
#include <fcntl.h>
static
int
serial_fd
;
static
int
serial_fd
=
-
1
;
void
serial_set_dtr
(
int
s
)
// pin 4
void
serial_set_dtr
(
int
s
)
// pin 4
{
{
...
@@ -137,4 +137,4 @@ void sys_delay(int msecs)
...
@@ -137,4 +137,4 @@ void sys_delay(int msecs)
void
serial_purge
()
void
serial_purge
()
{
{
while
(
serial_data_avail
())
serial_read_byte
();
while
(
serial_data_avail
())
serial_read_byte
();
}
}
\ No newline at end of file
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