diff options
author | Damien George <damien.p.george@gmail.com> | 2017-07-14 17:41:43 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-07-14 17:41:43 +1000 |
commit | 4fa9d97e4db333e3252b0e87584d29753f2da74d (patch) | |
tree | 105b1aca58593464b3a1124612ac5e587d2a2001 /stmhal/servo.c | |
parent | 9cca14a5dcba9e850e150fbd77803626df190f55 (diff) |
stmhal/servo: Don't compile servo code when it's not enabled.
Diffstat (limited to 'stmhal/servo.c')
-rw-r--r-- | stmhal/servo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/servo.c b/stmhal/servo.c index 2916ca280..e4bcbc30e 100644 --- a/stmhal/servo.c +++ b/stmhal/servo.c @@ -33,6 +33,8 @@ #include "timer.h" #include "servo.h" +#if MICROPY_HW_ENABLE_SERVO + // This file implements the pyb.Servo class which controls standard hobby servo // motors that have 3-wires (ground, power, signal). // @@ -328,3 +330,5 @@ const mp_obj_type_t pyb_servo_type = { .make_new = pyb_servo_make_new, .locals_dict = (mp_obj_dict_t*)&pyb_servo_locals_dict, }; + +#endif // MICROPY_HW_ENABLE_SERVO |