OSDN Git Service
(root)
/
openi2cradio
/
OpenI2CRadio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
54f8e3f
)
[SRECORD] Change footer "S9" to "S8". Address expression is 24bit.
author
K.Ohta
<whatisthis.sowhat@gmail.com>
Fri, 8 Nov 2013 04:04:01 +0000
(13:04 +0900)
committer
K.Ohta
<whatisthis.sowhat@gmail.com>
Fri, 8 Nov 2013 04:04:01 +0000
(13:04 +0900)
shell_strutl.c
patch
|
blob
|
history
diff --git
a/shell_strutl.c
b/shell_strutl.c
index
296820f
..
2fcaf7b
100644
(file)
--- a/
shell_strutl.c
+++ b/
shell_strutl.c
@@
-138,7
+138,7
@@
char str_shex2bin(unsigned char *s, unsigned char *p, unsigned long *addr, unsig
unsigned char c;
// Get Header
if(s[0] != 'S') return TERM_NONSREC;
unsigned char c;
// Get Header
if(s[0] != 'S') return TERM_NONSREC;
- if(s[1] == '2') { // Data co
i
re
+ if(s[1] == '2') { // Data core
for(i = 2; i < 8; i += 2) if(migrate_hex(&s[i]) == 0) return TERM_SRECERR;
bytes = hex2byte(&s[2]);
if(bytes <= 4) return TERM_SRECERR;
for(i = 2; i < 8; i += 2) if(migrate_hex(&s[i]) == 0) return TERM_SRECERR;
bytes = hex2byte(&s[2]);
if(bytes <= 4) return TERM_SRECERR;
@@
-274,11
+274,11
@@
unsigned char str_put_shexfooter(unsigned char *s)
unsigned char pp;
unsigned char sum;
s[0] = 'S';
unsigned char pp;
unsigned char sum;
s[0] = 'S';
- s[1] = '
9
';
+ s[1] = '
8
';
s[2] = '0';
s[2] = '0';
- s[3] = '
3
';
- sum =
3
;
- for(pp = 4; pp <
8
; pp++) s[pp] = '0';
+ s[3] = '
4
';
+ sum =
4
;
+ for(pp = 4; pp <
10
; pp++) s[pp] = '0';
sum = ~sum;
bin2hex(&s[pp], sum);
sum = ~sum;
bin2hex(&s[pp], sum);