mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c

Dependents:   Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay

Fork of mbed-dev by mbed official

Revision:
170:19eb464bc2be
Parent:
169:e3b6fe271b81
--- a/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c	Wed Jul 19 17:31:21 2017 +0100
+++ b/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c	Thu Aug 03 13:13:39 2017 +0100
@@ -487,11 +487,12 @@
     return p_spi_info->rx_buf;
 }
 
-int spi_master_block_write(spi_t *obj, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length) {
+int spi_master_block_write(spi_t *obj, const char *tx_buffer, int tx_length,
+                           char *rx_buffer, int rx_length, char write_fill) {
     int total = (tx_length > rx_length) ? tx_length : rx_length;
 
     for (int i = 0; i < total; i++) {
-        char out = (i < tx_length) ? tx_buffer[i] : 0xff;
+        char out = (i < tx_length) ? tx_buffer[i] : write_fill;
         char in = spi_master_write(obj, out);
         if (i < rx_length) {
             rx_buffer[i] = in;