mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ieee802154/submac: calculate symbol time on demand
This commit is contained in:
parent
3c3e1d7103
commit
a611b653d1
@ -27,8 +27,8 @@
|
|||||||
#define ENABLE_DEBUG 0
|
#define ENABLE_DEBUG 0
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#define CSMA_SENDER_BACKOFF_PERIOD_UNIT_US (320U)
|
#define CSMA_SENDER_BACKOFF_PERIOD_UNIT_US (320U)
|
||||||
#define ACK_TIMEOUT_US (864U)
|
#define ACK_TIMEOUT_SYMS (54U)
|
||||||
|
|
||||||
static char *str_states[IEEE802154_FSM_STATE_NUMOF] = {
|
static char *str_states[IEEE802154_FSM_STATE_NUMOF] = {
|
||||||
"INVALID",
|
"INVALID",
|
||||||
@ -282,7 +282,9 @@ static ieee802154_fsm_state_t _fsm_state_tx_process_tx_done(ieee802154_submac_t
|
|||||||
assert (res >= 0);
|
assert (res >= 0);
|
||||||
|
|
||||||
/* Handle ACK reception */
|
/* Handle ACK reception */
|
||||||
ieee802154_submac_ack_timer_set(submac, ACK_TIMEOUT_US);
|
uint8_t symbol_time = ieee802154_get_symbol_time(submac->channel_page,
|
||||||
|
submac->channel_num);
|
||||||
|
ieee802154_submac_ack_timer_set(submac, symbol_time * ACK_TIMEOUT_SYMS);
|
||||||
return IEEE802154_FSM_STATE_WAIT_FOR_ACK;
|
return IEEE802154_FSM_STATE_WAIT_FOR_ACK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user