fix/maixcam can not open tof100

This commit is contained in:
lxowalle
2026-03-13 19:24:48 +08:00
parent 6ee83e173f
commit 8b1b4594db

View File

@@ -56,7 +56,7 @@ namespace maix::peripheral::spi
transfer.bits_per_word = bits;
transfer.cs_change = used_soft_cs;
// log::info("[__spi_transfer] cs_change = %d", transfer.cs_change);
#if PLATFORM_MAIXCAM2
if (txbuf) {
auto data_size = len;
auto p_data = (uint8_t *)txbuf;
@@ -106,7 +106,10 @@ namespace maix::peripheral::spi
}
}
}
#else
if (::ioctl(fd, SPI_IOC_MESSAGE(1), &transfer) < 1)
return -1;
#endif
return 0;
}