|
@@ -51,7 +51,10 @@ bool GDS_SPIAttachDevice( struct GDS_Device* Device, int Width, int Height, int
|
|
|
SPIDeviceConfig.spics_io_num = CSPin;
|
|
|
SPIDeviceConfig.queue_size = 1;
|
|
|
SPIDeviceConfig.flags = SPI_DEVICE_NO_DUMMY;
|
|
|
-
|
|
|
+ SPIDeviceConfig.cs_ena_pretrans = Device->CS_pre;
|
|
|
+ SPIDeviceConfig.cs_ena_posttrans = Device->CS_post;
|
|
|
+ SPIDeviceConfig.mode = Device->SPI_mode;
|
|
|
+
|
|
|
ESP_ERROR_CHECK_NONFATAL( spi_bus_add_device( SPIHost, &SPIDeviceConfig, &SPIDevice ), return false );
|
|
|
|
|
|
Device->WriteCommand = SPIDefaultWriteCommand;
|