drivers/wireless/nrf24l01.c: Fix uninitialized irq_work which was causing a hard_fault on interrupt handler whenever something was sent from nrf24l01_term

This commit is contained in:
Petri Ahonen 2019-03-02 09:56:28 -06:00 committed by Gregory Nutt
parent ebdc96e4e6
commit 39faa097a6
1 changed files with 5 additions and 4 deletions

View File

@ -1489,10 +1489,11 @@ int nrf24l01_register(FAR struct spi_dev_s *spi,
return -ENOMEM;
}
dev->rx_fifo = rx_fifo;
dev->nxt_read = 0;
dev->nxt_write = 0;
dev->fifo_len = 0;
dev->rx_fifo = rx_fifo;
dev->nxt_read = 0;
dev->nxt_write = 0;
dev->fifo_len = 0;
dev->irq_work.worker = 0;
nxsem_init(&(dev->sem_fifo), 0, 1);
nxsem_init(&(dev->sem_rx), 0, 0);