spi: set sr2 quirk by default
most chips, it seems, write sr2 just after sr1 instead of having a separate command. Set this quirk by default. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
27dec515e7
commit
556fdb8e1b
5
spi.c
5
spi.c
@ -770,8 +770,9 @@ int spiInit(struct ff_spi *spi) {
|
|||||||
gpioWrite(spi->pins.wp, 1);
|
gpioWrite(spi->pins.wp, 1);
|
||||||
|
|
||||||
spi_get_id(spi);
|
spi_get_id(spi);
|
||||||
if (spi->id.manufacturer_id == 0x1f)
|
|
||||||
spi->quirks |= SQ_SR2_FROM_SR1;
|
spi->quirks |= SQ_SR2_FROM_SR1;
|
||||||
|
// if (spi->id.manufacturer_id == 0x1f)
|
||||||
if (spi->id.manufacturer_id == 0xef)
|
if (spi->id.manufacturer_id == 0xef)
|
||||||
spi->quirks |= SQ_SKIP_SR_WEL | SQ_SECURITY_NYBBLE_SHIFT;
|
spi->quirks |= SQ_SKIP_SR_WEL | SQ_SECURITY_NYBBLE_SHIFT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user