Skip to content

Commit a9c8db0

Browse files
committed
stmhal: Update for changes to mp_obj_str_get_data.
1 parent 3022e00 commit a9c8db0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

stmhal/lcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_lcd_light_obj, pyb_lcd_light);
373373
/// Write the string `str` to the screen. It will appear immediately.
374374
STATIC mp_obj_t pyb_lcd_write(mp_obj_t self_in, mp_obj_t str) {
375375
pyb_lcd_obj_t *self = self_in;
376-
mp_uint_t len;
376+
size_t len;
377377
const char *data = mp_obj_str_get_data(str, &len);
378378
lcd_write_strn(self, data, len);
379379
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
445445
STATIC mp_obj_t pyb_lcd_text(mp_uint_t n_args, const mp_obj_t *args) {
446446
// extract arguments
447447
pyb_lcd_obj_t *self = args[0];
448-
mp_uint_t len;
448+
size_t len;
449449
const char *data = mp_obj_str_get_data(args[1], &len);
450450
int x0 = mp_obj_get_int(args[2]);
451451
int y0 = mp_obj_get_int(args[3]);

stmhal/modnwcc3k.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,11 @@ STATIC mp_obj_t cc3k_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
477477
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
478478

479479
// get ssid
480-
mp_uint_t ssid_len;
480+
size_t ssid_len;
481481
const char *ssid = mp_obj_str_get_data(args[0].u_obj, &ssid_len);
482482

483483
// get key and sec
484-
mp_uint_t key_len = 0;
484+
size_t key_len = 0;
485485
const char *key = NULL;
486486
mp_uint_t sec = WLAN_SEC_UNSEC;
487487
if (args[1].u_obj != mp_const_none) {

stmhal/modusocket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ STATIC const mp_obj_type_t socket_type = {
388388

389389
// function usocket.getaddrinfo(host, port)
390390
STATIC mp_obj_t mod_usocket_getaddrinfo(mp_obj_t host_in, mp_obj_t port_in) {
391-
mp_uint_t hlen;
391+
size_t hlen;
392392
const char *host = mp_obj_str_get_data(host_in, &hlen);
393393
mp_int_t port = mp_obj_get_int(port_in);
394394

0 commit comments

Comments
 (0)