mirror of https://github.com/joan2937/pigpio
Merge branch 'master' of https://github.com/jaessy77/pigpio into jaessy77-master
This commit is contained in:
commit
720d612193
2
pigpio.c
2
pigpio.c
|
@ -4768,7 +4768,7 @@ int spiClose(unsigned handle)
|
||||||
if (spiInfo[handle].state != PI_SPI_OPENED)
|
if (spiInfo[handle].state != PI_SPI_OPENED)
|
||||||
SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle);
|
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))
|
if (!spiAnyOpen(spiInfo[handle].flags))
|
||||||
spiTerm(spiInfo[handle].flags); /* terminate on last close */
|
spiTerm(spiInfo[handle].flags); /* terminate on last close */
|
||||||
|
|
Loading…
Reference in New Issue