Corrected constant name in spiClose from PI_I2C_CLOSED to PI_SPI_CLOSED

This commit is contained in:
Marco Jassmann 2020-02-26 12:29:55 +01:00
parent 3a716863f0
commit 671adab8ad
1 changed files with 1 additions and 1 deletions

View File

@ -4768,7 +4768,7 @@ int spiClose(unsigned handle)
if (spiInfo[handle].state != PI_SPI_OPENED)
SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle);
spiInfo[handle].state = PI_I2C_CLOSED;
spiInfo[handle].state = PI_SPI_CLOSED;
if (!spiAnyOpen(spiInfo[handle].flags))
spiTerm(spiInfo[handle].flags); /* terminate on last close */