|  | @ -51,6 +51,7 @@ class epdHal: public GxEPD2_HalInterface, public SpiPatcherHandle { | 
			
		
	
		
		
			
				
					|  |  |             gpio_set_level(mPinClk, 0); |  |  |             gpio_set_level(mPinClk, 0); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             gpio_reset_pin(mPinCs); |  |  |             gpio_reset_pin(mPinCs); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             request_spi(); | 
			
		
	
		
		
			
				
					|  |  |             spi_device_interface_config_t devcfg = { |  |  |             spi_device_interface_config_t devcfg = { | 
			
		
	
		
		
			
				
					|  |  |                 .command_bits = 0, |  |  |                 .command_bits = 0, | 
			
		
	
		
		
			
				
					|  |  |                 .address_bits = 0, |  |  |                 .address_bits = 0, | 
			
		
	
	
		
		
			
				
					|  | @ -68,6 +69,7 @@ class epdHal: public GxEPD2_HalInterface, public SpiPatcherHandle { | 
			
		
	
		
		
			
				
					|  |  |                 .post_cb = nullptr |  |  |                 .post_cb = nullptr | 
			
		
	
		
		
			
				
					|  |  |             }; |  |  |             }; | 
			
		
	
		
		
			
				
					|  |  |             ESP_ERROR_CHECK(spi_bus_add_device(mHostDevice, &devcfg, &spi)); |  |  |             ESP_ERROR_CHECK(spi_bus_add_device(mHostDevice, &devcfg, &spi)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             release_spi(); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             if(GPIO_NUM_NC != mPinRst) { |  |  |             if(GPIO_NUM_NC != mPinRst) { | 
			
		
	
		
		
			
				
					|  |  |                 gpio_reset_pin(mPinRst); |  |  |                 gpio_reset_pin(mPinRst); | 
			
		
	
	
		
		
			
				
					|  | @ -152,14 +154,12 @@ class epdHal: public GxEPD2_HalInterface, public SpiPatcherHandle { | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             request_spi(); |  |  |             request_spi(); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  |             size_t spiLen = static_cast<size_t>(n + fill_with_zeroes) << 3; |  |  |  | 
			
		
	
		
		
			
				
					|  |  |             spi_transaction_t t = { |  |  |             spi_transaction_t t = { | 
			
		
	
		
		
			
				
					|  |  |                 .flags = SPI_TRANS_CS_KEEP_ACTIVE, |  |  |                 .flags = SPI_TRANS_CS_KEEP_ACTIVE, | 
			
		
	
		
		
			
				
					|  |  |                 .cmd = 0, |  |  |                 .cmd = 0, | 
			
		
	
		
		
			
				
					|  |  |                 .addr = 0, |  |  |                 .addr = 0, | 
			
		
	
		
		
			
				
					
					|  |  |                 .length = spiLen, |  |  |                 .length = 1u, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 .rxlength = spiLen, |  |  |                 .rxlength = 1u, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |                 .user = NULL, |  |  |                 .user = NULL, | 
			
		
	
		
		
			
				
					|  |  |                 .tx_buffer = data, |  |  |                 .tx_buffer = data, | 
			
		
	
		
		
			
				
					|  |  |                 .rx_buffer = data |  |  |                 .rx_buffer = data | 
			
		
	
	
		
		
			
				
					|  | 
 |