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

drivers/cc2420: fix bogus cc2420_set_state(dev, CC2420_GOTO_RX)

It doesn't compile, compiler complains that the enum type of
CC2420_GOTO_RX cannot be converted to netopt_state_t as required by the
function.
The numerical value of CC2420_GOTO_RX would be NETOPT_STATE_IDLE (2), which
makes sense as it puts the device into RX mode.
This commit is contained in:
Kaspar Schleiser 2020-07-29 18:51:13 +02:00
parent 4517e27837
commit d8794d7c5a

View File

@ -87,7 +87,7 @@ int cc2420_init(cc2420_t *dev)
cc2420_reg_write(dev, CC2420_REG_MDMCTRL0, reg);
/* go into RX state */
cc2420_set_state(dev, CC2420_GOTO_RX);
cc2420_set_state(dev, NETOPT_STATE_IDLE);
return 0;
}