From d8794d7c5ac0d74b79a4ecd570d8c5be634d6ac1 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 29 Jul 2020 18:51:13 +0200 Subject: [PATCH] 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. --- drivers/cc2420/cc2420.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cc2420/cc2420.c b/drivers/cc2420/cc2420.c index b8e8c2a0b2..76cbd51ebe 100644 --- a/drivers/cc2420/cc2420.c +++ b/drivers/cc2420/cc2420.c @@ -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; }