mbed library sources
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/spi_api.c
- Revision:
- 190:bde2479eef9e
- Parent:
- 174:8bb9f3a33240
- Child:
- 215:83cf97a28428
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/spi_api.c Wed May 14 14:00:07 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/spi_api.c Thu May 15 13:45:07 2014 +0100 @@ -138,7 +138,7 @@ } else { // Slave pinmap_pinout(ssel, PinMap_SPI_SSEL); obj->mode = SPI_Mode_Slave; - obj->nss = SPI_NSS_Soft; + obj->nss = SPI_NSS_Hard; } init_spi(obj); @@ -270,7 +270,8 @@ } int spi_slave_receive(spi_t *obj) { - return (ssp_readable(obj) && !ssp_busy(obj)) ? (1) : (0); + //return (ssp_readable(obj) && !ssp_busy(obj)) ? (1) : (0); // initial code + return (ssp_readable(obj)) ? (1) : (0); // works better like this }; int spi_slave_read(spi_t *obj) {