Bladeren bron

Ensure clock line is in the idle state before asserting chip select.

tags/v0.9.3
Michael Brown 17 jaren geleden
bovenliggende
commit
ca41159f57
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4
    0
      src/drivers/bitbash/spi_bit.c

+ 4
- 0
src/drivers/bitbash/spi_bit.c Bestand weergeven

@@ -153,6 +153,10 @@ static int spi_bit_rw ( struct spi_bus *bus, struct spi_device *device,
153 153
 		= container_of ( bus, struct spi_bit_basher, bus );
154 154
 	uint32_t tmp;
155 155
 
156
+	/* Set clock line to idle state */
157
+	write_bit ( &spibit->basher, SPI_BIT_SCLK, 
158
+		    ( bus->mode & SPI_MODE_CPOL ) );
159
+
156 160
 	/* Assert chip select on specified slave */
157 161
 	spi_bit_set_slave_select ( spibit, device->slave, SELECT_SLAVE );
158 162
 

Laden…
Annuleren
Opslaan