SPI driver: Correct return value in case of a certain error condition
This commit is contained in:
parent
2f7cae6e4a
commit
83c7b4d5d6
@ -5,20 +5,23 @@
|
|||||||
|
|
||||||
config DEV_PIPE_MAXSIZE
|
config DEV_PIPE_MAXSIZE
|
||||||
int "Maximum pipe/FIFO size"
|
int "Maximum pipe/FIFO size"
|
||||||
default 1024
|
default 1024 if !DEFAULT_SMALL
|
||||||
|
default 256 if DEFAULT_SMALL
|
||||||
---help---
|
---help---
|
||||||
Maximum configurable size of a pipe or FIFO at runtime.
|
Maximum configurable size of a pipe or FIFO at runtime.
|
||||||
|
|
||||||
config DEV_PIPE_SIZE
|
config DEV_PIPE_SIZE
|
||||||
int "Default pipe size"
|
int "Default pipe size"
|
||||||
default 1024
|
default 1024 if !DEFAULT_SMALL
|
||||||
|
default 256 if DEFAULT_SMALL
|
||||||
---help---
|
---help---
|
||||||
Sets the default size of the pipe ringbuffer in bytes. A value of
|
Sets the default size of the pipe ringbuffer in bytes. A value of
|
||||||
zero disables pipe support.
|
zero disables pipe support.
|
||||||
|
|
||||||
config DEV_FIFO_SIZE
|
config DEV_FIFO_SIZE
|
||||||
int "Default FIFO size"
|
int "Default FIFO size"
|
||||||
default 1024
|
default 1024 if !DEFAULT_SMALL
|
||||||
|
default 256 if DEFAULT_SMALL
|
||||||
---help---
|
---help---
|
||||||
Sets the default size of the FIFO ringbuffer in bytes. A value of
|
Sets the default size of the FIFO ringbuffer in bytes. A value of
|
||||||
zero disables FIFO support.
|
zero disables FIFO support.
|
||||||
|
@ -402,7 +402,7 @@ int spi_register(FAR struct spi_dev_s *spi, int bus)
|
|||||||
|
|
||||||
/* Return the result of the registration */
|
/* Return the result of the registration */
|
||||||
|
|
||||||
return OK;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -99,7 +99,9 @@ int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq)
|
|||||||
SPI_SETMODE(spi, seq->mode);
|
SPI_SETMODE(spi, seq->mode);
|
||||||
SPI_SETBITS(spi, seq->nbits);
|
SPI_SETBITS(spi, seq->nbits);
|
||||||
|
|
||||||
/* Select the SPI device in preparation for the transfer */
|
/* Select the SPI device in preparation for the transfer.
|
||||||
|
* REVISIT: This is redundant.
|
||||||
|
*/
|
||||||
|
|
||||||
SPI_SELECT(spi, seq->dev, true);
|
SPI_SELECT(spi, seq->dev, true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user