diff options
Diffstat (limited to 'stm/servo.c')
-rw-r--r-- | stm/servo.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/stm/servo.c b/stm/servo.c index 7facce7456..31190ce795 100644 --- a/stm/servo.c +++ b/stm/servo.c @@ -137,15 +137,14 @@ static mp_obj_t servo_obj_angle(mp_obj_t self_in, mp_obj_t angle) { static MP_DEFINE_CONST_FUN_OBJ_2(servo_obj_angle_obj, servo_obj_angle); -static const mp_method_t servo_obj_type_methods[] = { - { "angle", &servo_obj_angle_obj }, - { NULL, NULL }, -}; static const mp_obj_type_t servo_obj_type = { { &mp_const_type }, "Servo", .print = servo_obj_print, - .methods = servo_obj_type_methods, + .methods = { + { "angle", &servo_obj_angle_obj }, + { NULL, NULL }, + } }; mp_obj_t pyb_Servo(mp_obj_t servo_id) { |