Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ti-connected-launchpad
lm4tools_public
Commits
ff3e451f
Commit
ff3e451f
authored
Nov 01, 2012
by
Fabio Utzig
Browse files
Fix typos
parent
a19ed247
Changes
1
Hide whitespace changes
Inline
Side-by-side
lm4flash/lm4flash.c
View file @
ff3e451f
...
@@ -207,7 +207,7 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
...
@@ -207,7 +207,7 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
{
{
size_t
i
;
size_t
i
;
uint8_t
sum
=
0
;
uint8_t
sum
=
0
;
int
retval
,
transfered
;
int
retval
,
transfer
r
ed
;
int
has_ack
;
int
has_ack
;
if
(
idx
+
SNPRINTF_OFFSET
+
END_LEN
>
BUF_SIZE
)
if
(
idx
+
SNPRINTF_OFFSET
+
END_LEN
>
BUF_SIZE
)
...
@@ -222,7 +222,7 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
...
@@ -222,7 +222,7 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
if
(
retval
)
if
(
retval
)
return
retval
;
return
retval
;
retval
=
wait_response
(
handle
,
&
has_ack
,
&
transfered
);
retval
=
wait_response
(
handle
,
&
has_ack
,
&
transfer
r
ed
);
if
(
retval
)
if
(
retval
)
return
retval
;
return
retval
;
...
@@ -230,9 +230,9 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
...
@@ -230,9 +230,9 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx, int *xfer
return
LIBUSB_ERROR_OTHER
;
return
LIBUSB_ERROR_OTHER
;
if
(
xfer
)
if
(
xfer
)
*
xfer
=
transfered
;
*
xfer
=
transfer
r
ed
;
/* FIXME: validate transfered here? */
/* FIXME: validate transfer
r
ed here? */
return
retval
;
return
retval
;
}
}
...
@@ -349,15 +349,15 @@ static int send_flash_verify(libusb_device_handle *handle, const uint32_t addr,
...
@@ -349,15 +349,15 @@ static int send_flash_verify(libusb_device_handle *handle, const uint32_t addr,
{
{
size_t
i
,
j
;
size_t
i
,
j
;
char
by
,
rawbuf
[
1024
],
*
bp
=
rawbuf
;
char
by
,
rawbuf
[
1024
],
*
bp
=
rawbuf
;
int
retval
,
transfered
;
int
retval
,
transfer
r
ed
;
size_t
idx
=
snprintf
(
buf
.
c
,
BUF_SIZE
,
START
"x%x,%x"
,
addr
,
(
uint32_t
)
len
);
size_t
idx
=
snprintf
(
buf
.
c
,
BUF_SIZE
,
START
"x%x,%x"
,
addr
,
(
uint32_t
)
len
);
retval
=
checksum_and_send
(
handle
,
idx
,
&
transfered
);
retval
=
checksum_and_send
(
handle
,
idx
,
&
transfer
r
ed
);
if
(
retval
)
if
(
retval
)
return
retval
;
return
retval
;
for
(
i
=
0
;
i
<
transfered
;
i
++
)
{
for
(
i
=
0
;
i
<
transfer
r
ed
;
i
++
)
{
switch
(
by
=
buf
.
u8
[
i
])
{
switch
(
by
=
buf
.
u8
[
i
])
{
case
'}'
:
case
'}'
:
by
=
buf
.
u8
[
++
i
]
^
0x20
;
by
=
buf
.
u8
[
++
i
]
^
0x20
;
...
...
Write
Preview
Supports
Markdown
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