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
4332b21e
Commit
4332b21e
authored
Mar 20, 2015
by
funshine
Browse files
minor fix
parent
15622159
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/smart/smart.c
View file @
4332b21e
...
...
@@ -127,11 +127,19 @@ int smart_check(uint8_t *nibble, uint16_t len, uint8_t *dst, uint8_t *got){
return
res
;
}
void
detect
(
uint8
*
buf
,
uint16
len
){
void
detect
(
uint8
*
arg
,
uint16
len
){
uint16_t
seq
;
int16_t
seq_delta
=
0
;
uint16_t
byte_num
=
0
,
bit_num
=
0
;
int16_t
c
=
0
;
uint8
*
buf
=
NULL
;
if
(
len
==
12
){
return
;
}
else
if
(
len
>=
64
){
buf
=
arg
+
sizeof
(
struct
RxControl
);
}
else
{
return
;
}
if
(
(
(
buf
[
0
])
&
TYPE_SUBTYPE_MASK
)
!=
TYPE_SUBTYPE_QOS_DATA
){
return
;
}
...
...
app/smart/smart.h
View file @
4332b21e
...
...
@@ -59,6 +59,40 @@ extern "C" {
#define STATION_CHECK_TIME (2*1000)
struct
RxControl
{
signed
rssi
:
8
;
//表示该包的信号强度
unsigned
rate
:
4
;
unsigned
is_group
:
1
;
unsigned:
1
;
unsigned
sig_mode
:
2
;
//表示该包是否是11n 的包,0 表示非11n,非0 表示11n
unsigned
legacy_length
:
12
;
//如果不是11n 的包,它表示包的长度
unsigned
damatch0
:
1
;
unsigned
damatch1
:
1
;
unsigned
bssidmatch0
:
1
;
unsigned
bssidmatch1
:
1
;
unsigned
MCS
:
7
;
//如果是11n 的包,它表示包的调制编码序列,有效值:0-76
unsigned
CWB
:
1
;
//如果是11n 的包,它表示是否为HT40 的包
unsigned
HT_length
:
16
;
//如果是11n 的包,它表示包的长度
unsigned
Smoothing
:
1
;
unsigned
Not_Sounding
:
1
;
unsigned:
1
;
unsigned
Aggregation
:
1
;
unsigned
STBC
:
2
;
unsigned
FEC_CODING
:
1
;
//如果是11n 的包,它表示是否为LDPC 的包
unsigned
SGI
:
1
;
unsigned
rxend_state
:
8
;
unsigned
ampdu_cnt
:
8
;
unsigned
channel
:
4
;
//表示该包所在的信道
unsigned:
12
;
};
struct
sniffer_buf
{
struct
RxControl
rx_ctrl
;
// 12-bytes
u8
buf
[
48
];
//包含ieee80211 包头
u16
cnt
;
//包的个数
u16
len
[
1
];
//包的长度
};
struct
_my_addr_map
{
uint8
addr
[
ADDR_LENGTH
*
3
];
uint8_t
addr_len
;
...
...
app/spiffs/spiffs_nucleus.h
View file @
4332b21e
...
...
@@ -395,13 +395,11 @@ typedef struct __attribute(( packed )) {
// common page header
spiffs_page_header
p_hdr
;
// alignment
u8_t
_align
[
4
-
(
sizeof
(
spiffs_page_header
)
&
3
)
==
0
?
4
:
(
sizeof
(
spiffs_page_header
)
&
3
)];
u8_t
_align
[
4
-
(
(
sizeof
(
spiffs_page_header
)
+
sizeof
(
spiffs_obj_type
)
+
SPIFFS_OBJ_NAME_LEN
)
&
3
)
==
0
?
4
:
(
(
sizeof
(
spiffs_page_header
)
+
sizeof
(
spiffs_obj_type
)
+
SPIFFS_OBJ_NAME_LEN
)
&
3
)];
// size of object
u32_t
size
;
// type of object
spiffs_obj_type
type
;
// alignment2
u8_t
_align2
[
4
-
(
sizeof
(
spiffs_obj_type
)
&
3
)
==
0
?
4
:
(
sizeof
(
spiffs_obj_type
)
&
3
)];
// name of object
u8_t
name
[
SPIFFS_OBJ_NAME_LEN
];
}
spiffs_page_object_ix_header
;
...
...
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