summaryrefslogtreecommitdiffstatshomepage
path: root/stm/led.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-07 15:58:30 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-07 15:58:30 +0000
commit97209d38e17a0f3cb2a2d3f03d726fd322b4808f (patch)
tree514cc35179713b4128ec6218829d769d87d7fe70 /stm/led.c
parentd49420e74c721bb6c61925a6c9a2addbaeed3382 (diff)
parenta5a01df81d01705b9f04264cc46fbb1bc32641b3 (diff)
downloadmicropython-97209d38e17a0f3cb2a2d3f03d726fd322b4808f.tar.gz
micropython-97209d38e17a0f3cb2a2d3f03d726fd322b4808f.zip
Merge branch 'cplusplus' of https://github.com/ian-v/micropython into ian-v-cplusplus
Conflicts: py/objcomplex.c
Diffstat (limited to 'stm/led.c')
-rw-r--r--stm/led.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/stm/led.c b/stm/led.c
index d4bc0a0c87..eb7c76ef1f 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -176,15 +176,17 @@ mp_obj_t led_obj_off(mp_obj_t self_in) {
static MP_DEFINE_CONST_FUN_OBJ_1(led_obj_on_obj, led_obj_on);
static MP_DEFINE_CONST_FUN_OBJ_1(led_obj_off_obj, led_obj_off);
+static const mp_method_t led_methods[] = {
+ { "on", &led_obj_on_obj },
+ { "off", &led_obj_off_obj },
+ { NULL, NULL },
+};
+
static const mp_obj_type_t led_obj_type = {
{ &mp_const_type },
"Led",
.print = led_obj_print,
- .methods = {
- { "on", &led_obj_on_obj },
- { "off", &led_obj_off_obj },
- { NULL, NULL },
- }
+ .methods = led_methods,
};
mp_obj_t pyb_Led(mp_obj_t led_id) {