diff options
| author | Damien George <damien@micropython.org> | 2024-02-21 12:00:41 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-02-21 12:00:41 +1100 |
| commit | 01f4e85f1b360d40f8db99aa0db158fa5c2d796e (patch) | |
| tree | 5c9c7bdfad0684371d6807a7c0cac5979f82ad8d /extmod/modmachine.h | |
| parent | 31e718a6acd03f0cc3db5bc56e465bee933c1edb (diff) | |
extmod/modmachine: Remove MICROPY_PY_MACHINE guard from header.
So this header file can expose declarations for contents of the `machine`
module even if that module is disabled. Other parts of the system -- or
third-party code -- may need these declarations, for example when a single
component like MICROPY_PY_MACHINE_UART is enabled with MICROPY_PY_MACHINE
disabled.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modmachine.h')
| -rw-r--r-- | extmod/modmachine.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/extmod/modmachine.h b/extmod/modmachine.h index d186ce661..e6b08b3fc 100644 --- a/extmod/modmachine.h +++ b/extmod/modmachine.h @@ -30,9 +30,9 @@ #include "py/mphal.h" #include "py/obj.h" -#if MICROPY_PY_MACHINE - +#if MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_SOFTSPI #include "drivers/bus/spi.h" +#endif // Whether to enable the ADC.init() method. // Requires a port to implement mp_machine_adc_init_helper(). @@ -264,6 +264,4 @@ MP_DECLARE_CONST_FUN_OBJ_2(mp_machine_spi_write_obj); MP_DECLARE_CONST_FUN_OBJ_3(mp_machine_spi_write_readinto_obj); #endif -#endif // MICROPY_PY_MACHINE - #endif // MICROPY_INCLUDED_EXTMOD_MODMACHINE_H |
