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-dev by
Diff: targets/TARGET_NXP/TARGET_LPC43XX/spi_api.c
- Revision:
- 170:19eb464bc2be
- Parent:
- 167:e84263d55307
- Child:
- 172:7d866c31b3c5
diff -r e3b6fe271b81 -r 19eb464bc2be targets/TARGET_NXP/TARGET_LPC43XX/spi_api.c --- a/targets/TARGET_NXP/TARGET_LPC43XX/spi_api.c Wed Jul 19 17:31:21 2017 +0100 +++ b/targets/TARGET_NXP/TARGET_LPC43XX/spi_api.c Thu Aug 03 13:13:39 2017 +0100 @@ -196,11 +196,12 @@ return ssp_read(obj); } -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;