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
ff77dc56
Commit
ff77dc56
authored
Feb 17, 2014
by
Damien George
Browse files
Merge pull request #307 from iabdalkader/master
Fix usart_obj_tx_char
parents
f3494770
d0ffda91
Changes
1
Hide whitespace changes
Inline
Side-by-side
stm/usart.c
View file @
ff77dc56
...
...
@@ -205,8 +205,10 @@ static mp_obj_t usart_obj_rx_char(mp_obj_t self_in) {
static
mp_obj_t
usart_obj_tx_char
(
mp_obj_t
self_in
,
mp_obj_t
c
)
{
pyb_usart_obj_t
*
self
=
self_in
;
if
(
self
->
is_enabled
)
{
usart_tx_char
(
self
->
usart_id
,
mp_obj_get_int
(
c
));
uint
len
;
const
char
*
str
=
mp_obj_str_get_data
(
c
,
&
len
);
if
(
len
==
1
&&
self
->
is_enabled
)
{
usart_tx_char
(
self
->
usart_id
,
str
[
0
]);
}
return
mp_const_none
;
}
...
...
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