Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
a9c8db07
Commit
a9c8db07
authored
Mar 26, 2017
by
Damien George
Browse files
stmhal: Update for changes to mp_obj_str_get_data.
parent
3022e00b
Changes
3
Hide whitespace changes
Inline
Side-by-side
stmhal/lcd.c
View file @
a9c8db07
...
...
@@ -373,7 +373,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_lcd_light_obj, pyb_lcd_light);
/// Write the string `str` to the screen. It will appear immediately.
STATIC
mp_obj_t
pyb_lcd_write
(
mp_obj_t
self_in
,
mp_obj_t
str
)
{
pyb_lcd_obj_t
*
self
=
self_in
;
mp_uint
_t
len
;
size
_t
len
;
const
char
*
data
=
mp_obj_str_get_data
(
str
,
&
len
);
lcd_write_strn
(
self
,
data
,
len
);
return
mp_const_none
;
...
...
@@ -445,7 +445,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_lcd_pixel_obj, 4, 4, pyb_lcd_pixe
STATIC
mp_obj_t
pyb_lcd_text
(
mp_uint_t
n_args
,
const
mp_obj_t
*
args
)
{
// extract arguments
pyb_lcd_obj_t
*
self
=
args
[
0
];
mp_uint
_t
len
;
size
_t
len
;
const
char
*
data
=
mp_obj_str_get_data
(
args
[
1
],
&
len
);
int
x0
=
mp_obj_get_int
(
args
[
2
]);
int
y0
=
mp_obj_get_int
(
args
[
3
]);
...
...
stmhal/modnwcc3k.c
View file @
a9c8db07
...
...
@@ -477,11 +477,11 @@ STATIC mp_obj_t cc3k_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 ssid
mp_uint
_t
ssid_len
;
size
_t
ssid_len
;
const
char
*
ssid
=
mp_obj_str_get_data
(
args
[
0
].
u_obj
,
&
ssid_len
);
// get key and sec
mp_uint
_t
key_len
=
0
;
size
_t
key_len
=
0
;
const
char
*
key
=
NULL
;
mp_uint_t
sec
=
WLAN_SEC_UNSEC
;
if
(
args
[
1
].
u_obj
!=
mp_const_none
)
{
...
...
stmhal/modusocket.c
View file @
a9c8db07
...
...
@@ -388,7 +388,7 @@ STATIC const mp_obj_type_t socket_type = {
// function usocket.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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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