mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/spi_api.c
- Revision:
- 116:471443864d4b
- Parent:
- 115:4f0cb9cdc478
- Child:
- 166:cb4253f91ada
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/spi_api.c Tue Mar 11 12:00:07 2014 +0000 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/spi_api.c Tue Mar 11 17:15:06 2014 +0000 @@ -215,7 +215,7 @@ static inline void ssp_write(spi_t *obj, int value) { SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi); while (!ssp_writeable(obj)); - if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode + if(obj->bits == SPI_DataSize_8b) // 8 bit mode SPI_SendData8(spi, (uint8_t)value); else SPI_I2S_SendData16(spi, (uint16_t)value); @@ -224,7 +224,7 @@ static inline int ssp_read(spi_t *obj) { SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi); while (!ssp_readable(obj)); - if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode + if(obj->bits == SPI_DataSize_8b) // 8 bit mode return (int)SPI_ReceiveData8(spi); else // 16 bit mode return (int)SPI_I2S_ReceiveData16(spi); @@ -248,7 +248,7 @@ int spi_slave_read(spi_t *obj) { SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi); - if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode + if(obj->bits == SPI_DataSize_8b) // 8 bit mode return (int)SPI_ReceiveData8(spi); else return (int)SPI_I2S_ReceiveData16(spi); @@ -257,7 +257,7 @@ void spi_slave_write(spi_t *obj, int value) { SPI_TypeDef *spi = (SPI_TypeDef *)(obj->spi); while (!ssp_writeable(obj)); - if(obj->bits == SPI_DATASIZE_8BIT) // 8 bit mode + if(obj->bits == SPI_DataSize_8b) // 8 bit mode SPI_SendData8(spi, (uint8_t)value); else SPI_I2S_SendData16(spi, (uint16_t)value);