mirror of
https://github.com/eclipse/upm.git
synced 2025-03-27 19:00:42 +03:00
nrf8001: fix potential reference of uninitialized memory
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
df0a23f702
commit
d9850cf0f6
@ -233,10 +233,10 @@ static bool m_aci_spi_transfer(hal_aci_data_t * data_to_send, hal_aci_data_t * r
|
|||||||
max_bytes = HAL_ACI_MAX_LENGTH;
|
max_bytes = HAL_ACI_MAX_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transmit/receive the rest of the packet
|
// Transmit/receive the rest of the packet (skip first byte - cmd)
|
||||||
for (byte_cnt = 0; byte_cnt < max_bytes; byte_cnt++)
|
for (byte_cnt = 1; byte_cnt < max_bytes; byte_cnt++)
|
||||||
{
|
{
|
||||||
received_data->buffer[byte_cnt+1] = spi_readwrite(data_to_send->buffer[byte_sent_cnt++]);
|
received_data->buffer[byte_cnt] = spi_readwrite(data_to_send->buffer[byte_sent_cnt++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// RDYN should follow the REQN line in approx 100ns
|
// RDYN should follow the REQN line in approx 100ns
|
||||||
|
Loading…
x
Reference in New Issue
Block a user