diff options
Diffstat (limited to 'stm')
| -rw-r--r-- | stm/file.c | 2 | ||||
| -rw-r--r-- | stm/lcd.c | 4 | ||||
| -rw-r--r-- | stm/usart.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/stm/file.c b/stm/file.c index 84f7251fe..36658e7a6 100644 --- a/stm/file.c +++ b/stm/file.c @@ -29,7 +29,7 @@ mp_obj_t file_obj_read(mp_obj_t self_in, mp_obj_t arg) { mp_obj_t file_obj_write(mp_obj_t self_in, mp_obj_t arg) { pyb_file_obj_t *self = self_in; uint l; - const byte *s = mp_obj_str_get_data(arg, &l); + const char *s = mp_obj_str_get_data(arg, &l); UINT n_out; FRESULT res = f_write(&self->fp, s, l, &n_out); if (res != FR_OK) { @@ -202,8 +202,8 @@ mp_obj_t lcd_pix_show(void) { mp_obj_t lcd_print(mp_obj_t text) { uint len; - const byte *data = mp_obj_str_get_data(text, &len); - lcd_print_strn((const char*)data, len); + const char *data = mp_obj_str_get_data(text, &len); + lcd_print_strn(data, len); return mp_const_none; } diff --git a/stm/usart.c b/stm/usart.c index d9de599c4..306284d5a 100644 --- a/stm/usart.c +++ b/stm/usart.c @@ -159,7 +159,7 @@ void usart_tx_str(pyb_usart_t usart_id, const char *str) { } } -void usart_tx_bytes(pyb_usart_t usart_id, const byte *data, uint len) { +void usart_tx_bytes(pyb_usart_t usart_id, const char *data, uint len) { for (; len > 0; data++, len--) { usart_tx_char(usart_id, *data); } @@ -216,7 +216,7 @@ static mp_obj_t usart_obj_tx_str(mp_obj_t self_in, mp_obj_t s) { if (self->is_enabled) { if (MP_OBJ_IS_STR(s)) { uint len; - const byte *data = mp_obj_str_get_data(s, &len); + const char *data = mp_obj_str_get_data(s, &len); usart_tx_bytes(self->usart_id, data, len); } } |
