mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-03 19:20:21 +00:00
sx1280: only fetch rx pdu if buffer available
This commit is contained in:
parent
85a545aa55
commit
6e34cf2cc2
@ -845,11 +845,15 @@ static void radio_on_rx_done(void ){
|
|||||||
|
|
||||||
// only accept packets with new sequence number and len <= payload size
|
// only accept packets with new sequence number and len <= payload size
|
||||||
if ((sequence_number == ctx.next_expected_sequence_number) && (rx_len <= LL_MAX_PAYLOAD)) {
|
if ((sequence_number == ctx.next_expected_sequence_number) && (rx_len <= LL_MAX_PAYLOAD)) {
|
||||||
// update state
|
|
||||||
ctx.next_expected_sequence_number = 1 - sequence_number;
|
|
||||||
|
|
||||||
// register pdu fetch
|
bool rx_buffer_available = receive_prepare_rx_bufffer();
|
||||||
ctx.rx_pdu_received = true;
|
if (rx_buffer_available){
|
||||||
|
// update state
|
||||||
|
ctx.next_expected_sequence_number = 1 - sequence_number;
|
||||||
|
|
||||||
|
// register pdu fetch
|
||||||
|
ctx.rx_pdu_received = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// report outgoing packet as ack'ed and free if confirmed by peer
|
// report outgoing packet as ack'ed and free if confirmed by peer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user