spi: flash: the JEDEC ID should be at most three bytes in length

tags/0.1.0
S.J.R. van Schaik 8 years ago
parent 85a3f84d61
commit d53276e407
  1. 2
      source/drivers/spi_flash.c

@ -52,7 +52,7 @@ static size_t spi_flash_get_jedec_id(struct flash_dev *dev, uint8_t *jedec_id,
size_t len)
{
uint8_t cmd[1] = { SPI_FLASH_JEDEC_ID };
uint8_t buf[6];
uint8_t buf[3];
struct spi_dev *spi_dev = dev->priv;
spi_tx_rx(spi_dev, buf, sizeof buf, cmd, sizeof cmd);

Loading…
Cancel
Save