File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 24
24
* THE SOFTWARE.
25
25
*/
26
26
27
- #include "py/mpconfig.h"
28
- #if MICROPY_PY_MACHINE
29
-
30
27
#include <string.h>
31
-
32
28
#include "py/runtime.h"
29
+
30
+ #if MICROPY_PY_MACHINE_SIGNAL
31
+
33
32
#include "extmod/modmachine.h"
34
33
#include "extmod/virtpin.h"
35
34
@@ -181,4 +180,4 @@ MP_DEFINE_CONST_OBJ_TYPE(
181
180
locals_dict , & signal_locals_dict
182
181
);
183
182
184
- #endif // MICROPY_PY_MACHINE
183
+ #endif // MICROPY_PY_MACHINE_SIGNAL
Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ static const mp_rom_map_elem_t machine_module_globals_table[] = {
186
186
#if MICROPY_PY_MACHINE_PIN_BASE
187
187
{ MP_ROM_QSTR (MP_QSTR_PinBase ), MP_ROM_PTR (& machine_pinbase_type ) },
188
188
#endif
189
+ #if MICROPY_PY_MACHINE_SIGNAL
189
190
{ MP_ROM_QSTR (MP_QSTR_Signal ), MP_ROM_PTR (& machine_signal_type ) },
191
+ #endif
190
192
191
193
// Classes for software bus protocols.
192
194
#if MICROPY_PY_MACHINE_SOFTI2C
Original file line number Diff line number Diff line change @@ -1702,6 +1702,11 @@ typedef double mp_float_t;
1702
1702
#define MICROPY_PY_MACHINE_PULSE (0)
1703
1703
#endif
1704
1704
1705
+ // Whether to provide the "machine.Signal" class
1706
+ #ifndef MICROPY_PY_MACHINE_SIGNAL
1707
+ #define MICROPY_PY_MACHINE_SIGNAL (MICROPY_PY_MACHINE)
1708
+ #endif
1709
+
1705
1710
#ifndef MICROPY_PY_MACHINE_I2C
1706
1711
#define MICROPY_PY_MACHINE_I2C (0)
1707
1712
#endif
You can’t perform that action at this time.
0 commit comments