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>
pull/13716/head
Damien George 2024-02-21 12:00:41 +11:00
rodzic 31e718a6ac
commit 01f4e85f1b
1 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -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