Skip to content
Snippets Groups Projects
Commit ef255e47 authored by Damien George's avatar Damien George
Browse files

stmhal, usrsw: Wrap usrsw.c in #if, for when switch is not available.

parent b97c2f4c
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment