You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/06/11 10:07:09 UTC

[GitHub] mkiiskila closed pull request #1180: Fixed SPI Read in SX1272ReadBuffer

mkiiskila closed pull request #1180: Fixed SPI Read in SX1272ReadBuffer
URL: https://github.com/apache/mynewt-core/pull/1180
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/lora/sx1272/src/sx1272.c b/hw/drivers/lora/sx1272/src/sx1272.c
index 4a0f746f93..cd6d0cb6d8 100644
--- a/hw/drivers/lora/sx1272/src/sx1272.c
+++ b/hw/drivers/lora/sx1272/src/sx1272.c
@@ -1099,7 +1099,7 @@ SX1272ReadBuffer(uint16_t addr, uint8_t *buffer, uint8_t size)
     hal_gpio_write(RADIO_NSS, 0);
     hal_spi_tx_val(RADIO_SPI_IDX, addr & 0x7f);
     for(i = 0; i < size; i++) {
-        hal_spi_tx_val(RADIO_SPI_IDX, buffer[i]);
+        buffer[i] = hal_spi_tx_val(RADIO_SPI_IDX, 0);
     }
     hal_gpio_write(RADIO_NSS, 1);
 #endif


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services