mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +01:00
extmod/modmachine: Add MICROPY_PY_MACHINE_PIN_BASE option.
And use it in qemu-arm, unix and windows ports to enable PinBase. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -24,10 +24,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
#if MICROPY_PY_MACHINE
|
||||
|
||||
#include "py/runtime.h"
|
||||
|
||||
#if MICROPY_PY_MACHINE_PIN_BASE
|
||||
|
||||
#include "extmod/modmachine.h"
|
||||
#include "extmod/virtpin.h"
|
||||
|
||||
@@ -84,4 +84,4 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
||||
protocol, &pinbase_pin_p
|
||||
);
|
||||
|
||||
#endif // MICROPY_PY_MACHINE
|
||||
#endif // MICROPY_PY_MACHINE_PIN_BASE
|
||||
|
||||
@@ -81,7 +81,10 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_time_pulse_us), MP_ROM_PTR(&machine_time_pulse_us_obj) },
|
||||
#endif
|
||||
|
||||
// Class for Signal.
|
||||
// Classes for PinBase and Signal.
|
||||
#if MICROPY_PY_MACHINE_PIN_BASE
|
||||
{ MP_ROM_QSTR(MP_QSTR_PinBase), MP_ROM_PTR(&machine_pinbase_type) },
|
||||
#endif
|
||||
{ MP_ROM_QSTR(MP_QSTR_Signal), MP_ROM_PTR(&machine_signal_type) },
|
||||
|
||||
// Classes for software bus protocols.
|
||||
|
||||
Reference in New Issue
Block a user