Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
613eb255
Commit
613eb255
authored
11 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stm: Fix print methods with new kind argument.
parent
5573f9f1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
py/obj.h
+0
-1
0 additions, 1 deletion
py/obj.h
stm/adc.c
+1
-1
1 addition, 1 deletion
stm/adc.c
stm/i2c.c
+1
-1
1 addition, 1 deletion
stm/i2c.c
stm/led.c
+1
-1
1 addition, 1 deletion
stm/led.c
stm/servo.c
+1
-1
1 addition, 1 deletion
stm/servo.c
stm/usart.c
+1
-1
1 addition, 1 deletion
stm/usart.c
with
5 additions
and
6 deletions
py/obj.h
+
0
−
1
View file @
613eb255
...
...
@@ -243,7 +243,6 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2);
bool
mp_obj_less
(
mp_obj_t
o1
,
mp_obj_t
o2
);
machine_int_t
mp_obj_get_int
(
mp_obj_t
arg
);
machine_int_t
mp_obj_parse_int
(
mp_obj_t
arg
,
mp_obj_t
base_arg
);
#if MICROPY_ENABLE_FLOAT
mp_float_t
mp_obj_get_float
(
mp_obj_t
self_in
);
void
mp_obj_get_complex
(
mp_obj_t
self_in
,
mp_float_t
*
real
,
mp_float_t
*
imag
);
...
...
This diff is collapsed.
Click to expand it.
stm/adc.c
+
1
−
1
View file @
613eb255
...
...
@@ -267,7 +267,7 @@ static mp_obj_t adc_obj_read_core_vref(mp_obj_t self_in) {
return
ret
;
}
static
void
adc_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
)
{
static
void
adc_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pyb_adc_obj_t
*
self
=
self_in
;
print
(
env
,
"<ADC %lu>"
,
self
->
adc_id
);
}
...
...
This diff is collapsed.
Click to expand it.
stm/i2c.c
+
1
−
1
View file @
613eb255
...
...
@@ -252,7 +252,7 @@ typedef struct _pyb_i2c_obj_t {
i2c_state_t
i2c_state
;
}
pyb_i2c_obj_t
;
void
i2c_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
)
{
void
i2c_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pyb_i2c_obj_t
*
self
=
self_in
;
print
(
env
,
"<I2C%lu addr:%lu>"
,
(
unsigned
int
)
self
->
i2c_port
,
(
unsigned
int
)
self
->
i2c_addr
);
}
...
...
This diff is collapsed.
Click to expand it.
stm/led.c
+
1
−
1
View file @
613eb255
...
...
@@ -156,7 +156,7 @@ typedef struct _pyb_led_obj_t {
uint
led_id
;
}
pyb_led_obj_t
;
void
led_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
)
{
void
led_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pyb_led_obj_t
*
self
=
self_in
;
print
(
env
,
"<LED %lu>"
,
self
->
led_id
);
}
...
...
This diff is collapsed.
Click to expand it.
stm/servo.c
+
1
−
1
View file @
613eb255
...
...
@@ -116,7 +116,7 @@ typedef struct _pyb_servo_obj_t {
uint
servo_id
;
}
pyb_servo_obj_t
;
static
void
servo_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
)
{
static
void
servo_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pyb_servo_obj_t
*
self
=
self_in
;
print
(
env
,
"<Servo %lu>"
,
self
->
servo_id
);
}
...
...
This diff is collapsed.
Click to expand it.
stm/usart.c
+
1
−
1
View file @
613eb255
...
...
@@ -207,7 +207,7 @@ static mp_obj_t usart_obj_tx_str(mp_obj_t self_in, mp_obj_t s) {
return
mp_const_none
;
}
static
void
usart_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
)
{
static
void
usart_obj_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
self_in
,
mp_print_kind_t
kind
)
{
pyb_usart_obj_t
*
self
=
self_in
;
print
(
env
,
"<Usart %lu>"
,
self
->
usart_id
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment