Procházet zdrojové kódy

【完善】:使用 Micropython 的 spi 之前必须打开 rt-thread spi 驱动

SummerGift před 8 roky
rodič
revize
484fdf37fd
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      port/machine_hw_spi.c

+ 4 - 0
port/machine_hw_spi.c

@@ -33,6 +33,10 @@
 
 #ifdef MICROPYTHON_USING_MACHINE_SPI
 
+#ifndef RT_USING_SPI
+#error "Please define the RT_USING_SPI on 'rtconfig.h'"
+#endif
+
 STATIC const mp_obj_type_t machine_hard_spi_type;
 
 typedef struct _machine_hard_spi_obj_t {