Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
618f5544
Verified
Commit
618f5544
authored
Jul 06, 2019
by
Rahix
Browse files
feat(pycardium): Add some led constants
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
cb3de08d
Changes
2
Hide whitespace changes
Inline
Side-by-side
pycardium/modules/leds.c
View file @
618f5544
...
...
@@ -31,6 +31,10 @@ static MP_DEFINE_CONST_FUN_OBJ_2(leds_set_obj, mp_leds_set);
static
const
mp_rom_map_elem_t
leds_module_globals_table
[]
=
{
{
MP_ROM_QSTR
(
MP_QSTR___name__
),
MP_ROM_QSTR
(
MP_QSTR_leds
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set
),
MP_ROM_PTR
(
&
leds_set_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_BOTTOM_RIGHT
),
MP_OBJ_NEW_SMALL_INT
(
11
)
},
{
MP_ROM_QSTR
(
MP_QSTR_BOTTOM_LEFT
),
MP_OBJ_NEW_SMALL_INT
(
12
)
},
{
MP_ROM_QSTR
(
MP_QSTR_TOP_RIGHT
),
MP_OBJ_NEW_SMALL_INT
(
13
)
},
{
MP_ROM_QSTR
(
MP_QSTR_TOP_LEFT
),
MP_OBJ_NEW_SMALL_INT
(
14
)
},
};
static
MP_DEFINE_CONST_DICT
(
leds_module_globals
,
leds_module_globals_table
);
...
...
pycardium/modules/qstrdefs.h
View file @
618f5544
#include
"py/mpconfig.h"
#ifndef Q
#define Q(x)
#endif
/* leds */
Q
(
leds
)
Q
(
BOTTOM_LEFT
)
Q
(
BOTTOM_RIGHT
)
Q
(
TOP_LEFT
)
Q
(
TOP_RIGHT
)
/* utime */
Q
(
utime
)
...
...
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