Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
e9fa7625
Commit
e9fa7625
authored
Aug 12, 2015
by
Daniel Campora
Browse files
cc3200: Correct WLAN constructor argument checking.
parent
c0c07fb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/modwlan.c
View file @
e9fa7625
...
...
@@ -822,12 +822,12 @@ STATIC bool wlan_scan_result_is_unique (const mp_obj_list_t *nets, _u8 *bssid) {
/// Create a wlan object. See iwconfig for parameters of initialization.
STATIC
mp_obj_t
wlan_make_new
(
mp_obj_t
type_in
,
mp_uint_t
n_args
,
mp_uint_t
n_kw
,
const
mp_obj_t
*
args
)
{
// check arguments
mp_arg_check_num
(
n_args
,
n_kw
,
0
,
MP_ARRAY_SIZE
(
wlan_iwconfig_args
)
,
true
);
mp_arg_check_num
(
n_args
,
n_kw
,
0
,
0
,
true
);
wlan_obj
.
base
.
type
=
(
mp_obj_type_t
*
)
&
mod_network_nic_type_wlan
;
if
(
n_kw
>
0
)
{
mp_map_t
kw_args
;
mp_map_init_fixed_table
(
&
kw_args
,
n_kw
,
args
);
wlan_iwconfig
(
1
,
(
const
mp_obj_t
*
)
&
wlan_obj
,
&
kw_args
);
wlan_iwconfig
(
n_args
+
1
,
(
const
mp_obj_t
*
)
&
wlan_obj
,
&
kw_args
);
}
return
&
wlan_obj
;
}
...
...
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