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
44ee42de
Commit
44ee42de
authored
11 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stmhal: Rename pyb.Led to pyb.LED to conform to naming rules.
It's Light Emitting Diode, so should be LED.
parent
8cf08a58
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
stmhal/led.c
+2
-2
2 additions, 2 deletions
stmhal/led.c
stmhal/modpyb.c
+1
-1
1 addition, 1 deletion
stmhal/modpyb.c
stmhal/qstrdefsport.h
+2
-2
2 additions, 2 deletions
stmhal/qstrdefsport.h
with
5 additions
and
5 deletions
stmhal/led.c
+
2
−
2
View file @
44ee42de
...
...
@@ -204,7 +204,7 @@ STATIC mp_obj_t led_obj_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const
// check led number
if
(
!
(
0
<=
led_id
&&
led_id
<
NUM_LEDS
))
{
nlr_raise
(
mp_obj_new_exception_msg_varg
(
&
mp_type_ValueError
,
"L
ed
%d does not exist"
,
led_id
));
nlr_raise
(
mp_obj_new_exception_msg_varg
(
&
mp_type_ValueError
,
"L
ED
%d does not exist"
,
led_id
));
}
// return static led object
...
...
@@ -255,7 +255,7 @@ STATIC MP_DEFINE_CONST_DICT(led_locals_dict, led_locals_dict_table);
const
mp_obj_type_t
pyb_led_type
=
{
{
&
mp_type_type
},
.
name
=
MP_QSTR_L
ed
,
.
name
=
MP_QSTR_L
ED
,
.
print
=
led_obj_print
,
.
make_new
=
led_obj_make_new
,
.
locals_dict
=
(
mp_obj_t
)
&
led_locals_dict
,
...
...
This diff is collapsed.
Click to expand it.
stmhal/modpyb.c
+
1
−
1
View file @
44ee42de
...
...
@@ -281,7 +281,7 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = {
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_SD
),
(
mp_obj_t
)
&
pyb_sdcard_obj
},
#endif
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_L
ed
),
(
mp_obj_t
)
&
pyb_led_type
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_L
ED
),
(
mp_obj_t
)
&
pyb_led_type
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_I2C
),
(
mp_obj_t
)
&
pyb_i2c_type
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_USART
),
(
mp_obj_t
)
&
pyb_usart_type
},
...
...
This diff is collapsed.
Click to expand it.
stmhal/qstrdefsport.h
+
2
−
2
View file @
44ee42de
...
...
@@ -66,8 +66,8 @@ Q(PULL_NONE)
Q
(
PULL_UP
)
Q
(
PULL_DOWN
)
// for L
ed
object
Q
(
L
ed
)
// for L
ED
object
Q
(
L
ED
)
Q
(
on
)
Q
(
off
)
Q
(
toggle
)
...
...
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