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
Revision 210:45934c3d812a, committed 2014-05-23
- Comitter:
- mbed_official
- Date:
- Fri May 23 14:00:06 2014 +0100
- Parent:
- 209:137057ef9d1e
- Child:
- 211:fb8edfff6ae1
- Commit message:
- Synchronized with git revision 99a176f7d5549b64361bb8968207bf651d580e69
Full URL: https://github.com/mbedmicro/mbed/commit/99a176f7d5549b64361bb8968207bf651d580e69/
[NUCLEO_L053R8] I2C1 clock + SPI slave receive
Changed in this revision
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/i2c_api.c Fri May 23 11:30:06 2014 +0100
+++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/i2c_api.c Fri May 23 14:00:06 2014 +0100
@@ -79,7 +79,7 @@
// when there is no waiting time after a STOP.
// This wait is also included on the samples
// code provided with the freedom board
- for (n = 0; n < 100; n++) __NOP();
+ for (n = 0; n < 200; n++) __NOP();
return 0;
}
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/device.h Fri May 23 11:30:06 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/device.h Fri May 23 14:00:06 2014 +0100 @@ -45,7 +45,7 @@ #define DEVICE_I2CSLAVE 1 #define DEVICE_SPI 1 -#define DEVICE_SPISLAVE 0 // Not supported yet +#define DEVICE_SPISLAVE 1 #define DEVICE_RTC 1
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c Fri May 23 11:30:06 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c Fri May 23 14:00:06 2014 +0100
@@ -72,6 +72,7 @@
// Enable I2C clock
if (obj->i2c == I2C_1) {
+ __HAL_RCC_I2C1_CONFIG(RCC_I2C1CLKSOURCE_SYSCLK);
__I2C1_CLK_ENABLE();
}
if (obj->i2c == I2C_2) {
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c Fri May 23 11:30:06 2014 +0100
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/spi_api.c Fri May 23 14:00:06 2014 +0100
@@ -263,7 +263,7 @@
}
int spi_slave_receive(spi_t *obj) {
- return (!ssp_busy(obj)) ? (1) : (0);
+ return (ssp_readable(obj)) ? (1) : (0);
};
int spi_slave_read(spi_t *obj) {
