Skip to content

Commit 4f9e9f6

Browse files
authored
Merge pull request #3540 from LMESTM/fix_spi_rx_init
STM: SPI: Initialize Rx in spi_master_write
2 parents 5fd8a5e + fd3a3f9 commit 4f9e9f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

targets/TARGET_STM/stm_spi_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ static inline int ssp_busy(spi_t *obj)
344344

345345
int spi_master_write(spi_t *obj, int value)
346346
{
347-
uint16_t size, Rx, ret;
347+
uint16_t size, ret;
348+
int Rx = 0;
348349
struct spi_s *spiobj = SPI_S(obj);
349350
SPI_HandleTypeDef *handle = &(spiobj->handle);
350351

0 commit comments

Comments
 (0)