Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
c1a77a0c
Commit
c1a77a0c
authored
Apr 17, 2015
by
Daniel Campora
Browse files
cc3200: Use new %q format to print qstr's where appropiate.
parent
2cd247e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
cc3200/misc/pin_named_pins.c
View file @
c1a77a0c
...
...
@@ -39,7 +39,7 @@
STATIC
void
pin_named_pins_obj_print
(
const
mp_print_t
*
print
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pin_named_pins_obj_t
*
self
=
self_in
;
mp_printf
(
print
,
"<Pin.%
s
>"
,
qstr_str
(
self
->
name
)
)
;
mp_printf
(
print
,
"<Pin.%
q
>"
,
self
->
name
);
}
const
mp_obj_type_t
pin_cpu_pins_obj_type
=
{
...
...
cc3200/mods/pybpin.c
View file @
c1a77a0c
...
...
@@ -436,7 +436,7 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
uint32_t
strength
=
pin_get_strenght
(
self
);
// pin name
mp_printf
(
print
,
"<Pin.cpu.%
s
, af=%u"
,
qstr_str
(
self
->
name
)
,
af
);
mp_printf
(
print
,
"<Pin.cpu.%
q
, af=%u"
,
self
->
name
,
af
);
if
(
af
==
PIN_MODE_0
)
{
// IO mode
...
...
@@ -447,7 +447,7 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
}
else
{
mode_qst
=
MP_QSTR_OUT
;
}
mp_printf
(
print
,
", mode=Pin.%
s
"
,
qstr_str
(
mode_qst
)
)
;
mp_printf
(
print
,
", mode=Pin.%
q
"
,
mode_qst
);
}
// pin type
...
...
@@ -465,7 +465,7 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
}
else
{
type_qst
=
MP_QSTR_OD_PD
;
}
mp_printf
(
print
,
", pull=Pin.%
s
"
,
qstr_str
(
type_qst
)
)
;
mp_printf
(
print
,
", pull=Pin.%
q
"
,
type_qst
);
// Strength
qstr
str_qst
;
...
...
@@ -476,7 +476,7 @@ STATIC void pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
}
else
{
str_qst
=
MP_QSTR_S6MA
;
}
mp_printf
(
print
,
", strength=Pin.%
s
>"
,
qstr_str
(
str_qst
)
)
;
mp_printf
(
print
,
", strength=Pin.%
q
>"
,
str_qst
);
}
/// \classmethod \constructor(id, ...)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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