diff options
| author | Damien George | 2014-04-21 18:31:40 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-21 18:31:40 +0100 |
| commit | ef255e47c197b52c4d629f2a0709af187e97d540 (patch) | |
| tree | a629b79136d19b5fb06c203d16a1fcd338ebb417 /stmhal/usrsw.c | |
| parent | b97c2f4c1421afedf8384080b12e806a5ddc914a (diff) | |
stmhal, usrsw: Wrap usrsw.c in #if, for when switch is not available.
Diffstat (limited to 'stmhal/usrsw.c')
| -rw-r--r-- | stmhal/usrsw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/usrsw.c b/stmhal/usrsw.c index 088b53ad1..7a077e1db 100644 --- a/stmhal/usrsw.c +++ b/stmhal/usrsw.c @@ -12,6 +12,8 @@ #include "genhdr/pins.h" #include "usrsw.h" +#if MICROPY_HW_HAS_SWITCH + // Usage Model: // // sw = pyb.Switch() # create a switch object @@ -111,3 +113,5 @@ const mp_obj_type_t pyb_switch_type = { .call = pyb_switch_call, .locals_dict = (mp_obj_t)&pyb_switch_locals_dict, }; + +#endif // MICROPY_HW_HAS_SWITCH |
