Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c
- Revision:
- 233:1bbc1451db33
- Parent:
- 227:7bd0639b8911
diff -r 1e593fe58241 -r 1bbc1451db33 targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c Tue Jun 17 11:00:07 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c Tue Jun 17 11:30:08 2014 +0100
@@ -166,10 +166,10 @@
void spi_format(spi_t *obj, int bits, int mode, int slave) {
// Save new values
- if (bits == 8) {
+ if (bits == 16) {
+ obj->bits = SPI_DATASIZE_16BIT;
+ } else {
obj->bits = SPI_DATASIZE_8BIT;
- } else {
- obj->bits = SPI_DATASIZE_16BIT;
}
switch (mode) {
@@ -265,7 +265,7 @@
}
int spi_slave_receive(spi_t *obj) {
- return (ssp_readable(obj)) ? (1) : (0);
+ return (ssp_readable(obj) ? 1 : 0);
};
int spi_slave_read(spi_t *obj) {
