1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cc2420: use netdev reset function

This commit is contained in:
Koen Zandberg 2018-07-10 14:29:00 +02:00
parent c04cb23cbc
commit 327295a1e1
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -49,9 +49,7 @@ int cc2420_init(cc2420_t *dev)
uint16_t reg;
uint8_t addr[8];
/* reset options and sequence number */
dev->netdev.seq = 0;
dev->netdev.flags = 0;
netdev_ieee802154_reset(&dev->netdev);
/* set default address, channel, PAN ID, and TX power */
luid_get(addr, sizeof(addr));
@ -73,12 +71,6 @@ int cc2420_init(cc2420_t *dev)
#ifdef MODULE_NETSTATS_L2
cc2420_set_option(dev, CC2420_OPT_TELL_RX_END, true);
#endif
/* set default protocol*/
#ifdef MODULE_GNRC_SIXLOWPAN
dev->netdev.proto = GNRC_NETTYPE_SIXLOWPAN;
#elif MODULE_GNRC
dev->netdev.proto = GNRC_NETTYPE_UNDEF;
#endif
/* change default RX bandpass filter to 1.3uA (as recommended) */
reg = cc2420_reg_read(dev, CC2420_REG_RXCTRL1);