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
3a773427
Commit
3a773427
authored
Mar 26, 2017
by
Damien George
Browse files
cc3200: Update for changes to mp_obj_str_get_data.
parent
1145dd35
Changes
2
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/modusocket.c
View file @
3a773427
...
...
@@ -737,7 +737,7 @@ STATIC const mp_obj_type_t socket_type = {
// function usocket.getaddrinfo(host, port)
/// \function getaddrinfo(host, port)
STATIC
mp_obj_t
mod_usocket_getaddrinfo
(
mp_obj_t
host_in
,
mp_obj_t
port_in
)
{
mp_uint
_t
hlen
;
size
_t
hlen
;
const
char
*
host
=
mp_obj_str_get_data
(
host_in
,
&
hlen
);
mp_int_t
port
=
mp_obj_get_int
(
port_in
);
...
...
cc3200/mods/modwlan.c
View file @
3a773427
...
...
@@ -773,7 +773,7 @@ STATIC mp_obj_t wlan_init_helper(wlan_obj_t *self, const mp_arg_val_t *args) {
wlan_validate_mode
(
mode
);
// get the ssid
mp_uint
_t
ssid_len
=
0
;
size
_t
ssid_len
=
0
;
const
char
*
ssid
=
NULL
;
if
(
args
[
1
].
u_obj
!=
NULL
)
{
ssid
=
mp_obj_str_get_data
(
args
[
1
].
u_obj
,
&
ssid_len
);
...
...
@@ -782,7 +782,7 @@ STATIC mp_obj_t wlan_init_helper(wlan_obj_t *self, const mp_arg_val_t *args) {
// get the auth config
uint8_t
auth
=
SL_SEC_TYPE_OPEN
;
mp_uint
_t
key_len
=
0
;
size
_t
key_len
=
0
;
const
char
*
key
=
NULL
;
if
(
args
[
2
].
u_obj
!=
mp_const_none
)
{
mp_obj_t
*
sec
;
...
...
@@ -922,13 +922,13 @@ STATIC mp_obj_t wlan_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
mp_arg_parse_all
(
n_args
-
1
,
pos_args
+
1
,
kw_args
,
MP_ARRAY_SIZE
(
allowed_args
),
allowed_args
,
args
);
// get the ssid
mp_uint
_t
ssid_len
;
size
_t
ssid_len
;
const
char
*
ssid
=
mp_obj_str_get_data
(
args
[
0
].
u_obj
,
&
ssid_len
);
wlan_validate_ssid_len
(
ssid_len
);
// get the auth config
uint8_t
auth
=
SL_SEC_TYPE_OPEN
;
mp_uint
_t
key_len
=
0
;
size
_t
key_len
=
0
;
const
char
*
key
=
NULL
;
if
(
args
[
1
].
u_obj
!=
mp_const_none
)
{
mp_obj_t
*
sec
;
...
...
@@ -1077,7 +1077,7 @@ STATIC mp_obj_t wlan_ssid (mp_uint_t n_args, const mp_obj_t *args) {
if
(
n_args
==
1
)
{
return
mp_obj_new_str
((
const
char
*
)
self
->
ssid
,
strlen
((
const
char
*
)
self
->
ssid
),
false
);
}
else
{
mp_uint
_t
len
;
size
_t
len
;
const
char
*
ssid
=
mp_obj_str_get_data
(
args
[
1
],
&
len
);
wlan_validate_ssid_len
(
len
);
wlan_set_ssid
(
ssid
,
len
,
false
);
...
...
@@ -1101,7 +1101,7 @@ STATIC mp_obj_t wlan_auth (mp_uint_t n_args, const mp_obj_t *args) {
}
else
{
// get the auth config
uint8_t
auth
=
SL_SEC_TYPE_OPEN
;
mp_uint
_t
key_len
=
0
;
size
_t
key_len
=
0
;
const
char
*
key
=
NULL
;
if
(
args
[
1
]
!=
mp_const_none
)
{
mp_obj_t
*
sec
;
...
...
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