Przeglądaj źródła

【完善】:开启接收串口中断配置项

SummerGift 7 lat temu
rodzic
commit
fd3553388e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      port/machine_uart.c

+ 1 - 1
port/machine_uart.c

@@ -68,7 +68,7 @@ STATIC mp_obj_t machine_uart_make_new(const mp_obj_type_t *type, size_t n_args,
     }
     }
 	
 	
     rt_err_t result;
     rt_err_t result;
-    result = rt_device_open((rt_device_t)rt_serial_device, RT_DEVICE_OFLAG_RDWR);
+    result = rt_device_open((rt_device_t)rt_serial_device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX );
     if (result != RT_EOK)
     if (result != RT_EOK)
     {
     {
         rt_kprintf("ERROR: UART device %s can't open!\n", uart_dev_name);
         rt_kprintf("ERROR: UART device %s can't open!\n", uart_dev_name);