Skip to content

Commit

Permalink
fixup! ieee802154_submac: add initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
jia200x committed Sep 9, 2020
1 parent 362d259 commit 60e63ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/net/link_layer/ieee802154/submac.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "errno.h"
#include <assert.h>

#define CSMA_SENDER_BACKOFF_PERIOD_UNIT (320U)
#define ACK_TIMEOUT_US (864U)
#define CSMA_SENDER_BACKOFF_PERIOD_UNIT_MS (320U)
#define ACK_TIMEOUT_US (864U)

#define IEEE802154_CCA_THRESH_DEFAULT (-70) /* dBm */

Expand Down Expand Up @@ -57,7 +57,7 @@ static int _perform_csma_ca(ieee802154_submac_t *submac)
ieee802154_radio_request_set_trx_state(dev, IEEE802154_TRX_STATE_TX_ON);
/* delay for an adequate random backoff period */
uint32_t bp = (random_uint32() & submac->backoff_mask) *
CSMA_SENDER_BACKOFF_PERIOD_UNIT;
CSMA_SENDER_BACKOFF_PERIOD_UNIT_MS;

xtimer_usleep(bp);

Expand Down

0 comments on commit 60e63ac

Please sign in to comment.