Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
c529d56a
Commit
c529d56a
authored
Feb 07, 2015
by
funshine
Browse files
minor fix to debug mode
parent
3077990a
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/coap/coap_client.c
View file @
c529d56a
...
@@ -51,12 +51,12 @@ void coap_client_response_handler(char *data, unsigned short len, unsigned short
...
@@ -51,12 +51,12 @@ void coap_client_response_handler(char *data, unsigned short len, unsigned short
{
{
/* There is no block option set, just read the data and we are done. */
/* There is no block option set, just read the data and we are done. */
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
pkt
.
payload
.
p
);
NODE_DBG
(
(
char
*
)(
pkt
.
payload
.
p
)
)
;
}
}
else
if
(
COAP_RESPONSE_CLASS
(
pkt
.
hdr
.
code
)
>=
4
)
else
if
(
COAP_RESPONSE_CLASS
(
pkt
.
hdr
.
code
)
>=
4
)
{
{
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
pkt
.
payload
.
p
);
NODE_DBG
(
(
char
*
)(
pkt
.
payload
.
p
)
)
;
}
}
}
}
...
...
app/coap/endpoints.c
View file @
c529d56a
...
@@ -48,7 +48,7 @@ static int handle_get_variable(const coap_endpoint_t *ep, coap_rw_buffer_t *scra
...
@@ -48,7 +48,7 @@ static int handle_get_variable(const coap_endpoint_t *ep, coap_rw_buffer_t *scra
if
(
0
==
c_memcmp
(
h
->
name
,
opt
[
count
-
1
].
buf
.
p
,
opt
[
count
-
1
].
buf
.
len
))
if
(
0
==
c_memcmp
(
h
->
name
,
opt
[
count
-
1
].
buf
.
p
,
opt
[
count
-
1
].
buf
.
len
))
{
{
NODE_DBG
(
"/v1/v/"
);
NODE_DBG
(
"/v1/v/"
);
NODE_DBG
(
h
->
name
);
NODE_DBG
(
(
char
*
)
h
->
name
);
NODE_DBG
(
" match.
\n
"
);
NODE_DBG
(
" match.
\n
"
);
if
(
h
->
L
==
NULL
)
if
(
h
->
L
==
NULL
)
return
coap_make_response
(
scratch
,
outpkt
,
NULL
,
0
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_NOT_FOUND
,
COAP_CONTENTTYPE_NONE
);
return
coap_make_response
(
scratch
,
outpkt
,
NULL
,
0
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_NOT_FOUND
,
COAP_CONTENTTYPE_NONE
);
...
@@ -103,7 +103,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
...
@@ -103,7 +103,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
if
(
0
==
c_memcmp
(
h
->
name
,
opt
[
count
-
1
].
buf
.
p
,
opt
[
count
-
1
].
buf
.
len
))
if
(
0
==
c_memcmp
(
h
->
name
,
opt
[
count
-
1
].
buf
.
p
,
opt
[
count
-
1
].
buf
.
len
))
{
{
NODE_DBG
(
"/v1/f/"
);
NODE_DBG
(
"/v1/f/"
);
NODE_DBG
(
h
->
name
);
NODE_DBG
(
(
char
*
)
h
->
name
);
NODE_DBG
(
" match.
\n
"
);
NODE_DBG
(
" match.
\n
"
);
if
(
h
->
L
==
NULL
)
if
(
h
->
L
==
NULL
)
...
@@ -128,7 +128,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
...
@@ -128,7 +128,7 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
luaL_error
(
h
->
L
,
"return string:<MAX_PAYLOAD_SIZE"
);
luaL_error
(
h
->
L
,
"return string:<MAX_PAYLOAD_SIZE"
);
return
coap_make_response
(
scratch
,
outpkt
,
NULL
,
0
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_NOT_FOUND
,
COAP_CONTENTTYPE_NONE
);
return
coap_make_response
(
scratch
,
outpkt
,
NULL
,
0
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_NOT_FOUND
,
COAP_CONTENTTYPE_NONE
);
}
}
NODE_DBG
(
ret
);
NODE_DBG
(
(
char
*
)
ret
);
NODE_DBG
(
"
\n
"
);
NODE_DBG
(
"
\n
"
);
return
coap_make_response
(
scratch
,
outpkt
,
ret
,
len
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_CONTENT
,
COAP_CONTENTTYPE_TEXT_PLAIN
);
return
coap_make_response
(
scratch
,
outpkt
,
ret
,
len
,
id_hi
,
id_lo
,
&
inpkt
->
tok
,
COAP_RSPCODE_CONTENT
,
COAP_CONTENTTYPE_TEXT_PLAIN
);
}
}
...
...
app/modules/coap.c
View file @
c529d56a
...
@@ -292,12 +292,12 @@ static void coap_response_handler(void *arg, char *pdata, unsigned short len)
...
@@ -292,12 +292,12 @@ static void coap_response_handler(void *arg, char *pdata, unsigned short len)
{
{
/* There is no block option set, just read the data and we are done. */
/* There is no block option set, just read the data and we are done. */
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
pkt
.
payload
.
p
);
NODE_DBG
(
(
char
*
)
pkt
.
payload
.
p
);
}
}
else
if
(
COAP_RESPONSE_CLASS
(
pkt
.
hdr
.
code
)
>=
4
)
else
if
(
COAP_RESPONSE_CLASS
(
pkt
.
hdr
.
code
)
>=
4
)
{
{
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
"%d.%02d
\t
"
,
(
pkt
.
hdr
.
code
>>
5
),
pkt
.
hdr
.
code
&
0x1F
);
NODE_DBG
(
pkt
.
payload
.
p
);
NODE_DBG
(
(
char
*
)
pkt
.
payload
.
p
);
}
}
}
}
...
...
ld/eagle.app.v6.ld
View file @
c529d56a
...
@@ -5,7 +5,7 @@ MEMORY
...
@@ -5,7 +5,7 @@ MEMORY
dport0_0_seg : org = 0x3FF00000, len = 0x10
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40210000, len = 0x
54
000
irom0_0_seg : org = 0x40210000, len = 0x
60
000
}
}
PHDRS
PHDRS
...
...
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