Commit e98cc2b6 authored by mux's avatar mux
Browse files

Fix usart_obj_tx_str

* Fix usart_obj_tx_str to send the actual string.
* Fix issue #126
parent ab04f580
...@@ -205,8 +205,10 @@ static mp_obj_t usart_obj_tx_char(mp_obj_t self_in, mp_obj_t c) { ...@@ -205,8 +205,10 @@ static mp_obj_t usart_obj_tx_char(mp_obj_t self_in, mp_obj_t c) {
static mp_obj_t usart_obj_tx_str(mp_obj_t self_in, mp_obj_t s) { static mp_obj_t usart_obj_tx_str(mp_obj_t self_in, mp_obj_t s) {
pyb_usart_obj_t *self = self_in; pyb_usart_obj_t *self = self_in;
if (self->is_enabled) { if (self->is_enabled) {
//usart_tx_str(self->usart_id, mp_obj_get_str(s)); if (MP_OBJ_IS_TYPE(s, &str_type)) {
usart_tx_str(self->usart_id, "test"); const char *str = qstr_str(mp_obj_get_qstr(s));
usart_tx_str(self->usart_id, str);
}
} }
return mp_const_none; return mp_const_none;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment