6125ba4a7f
Instead of pyb.switch() as a function, it's more consistent (with respect to all the other modules and peripherals) to have pyb.Switch() create a switch object. This then generalises to having multiple switches. Call the object to get its state. Use sw.callback to set the callback function for when the switch is pressed.
5 lines
92 B
C
5 lines
92 B
C
void switch_init0(void);
|
|
int switch_get(void);
|
|
|
|
extern const mp_obj_type_t pyb_switch_type;
|