Skip to content
Snippets Groups Projects
Commit 36297969 authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

drivers/nrf24l01p: add function to disable crc

parent 4618bcfa
No related branches found
No related tags found
No related merge requests found
......@@ -546,6 +546,15 @@ int nrf24l01p_enable_pipe(nrf24l01p_t *dev, nrf24l01p_rx_pipe_t pipe);
*/
int nrf24l01p_disable_pipe(nrf24l01p_t *dev, nrf24l01p_rx_pipe_t pipe);
/**
* @brief Disable CRC error detection on the nrf24l01+ transceiver.
*
* @param[in] dev Transceiver device to use.
*
* @return 0.
*/
int nrf24l01p_disable_crc(nrf24l01p_t *dev);
/**
* @brief Enable CRC error detection on the nrf24l01+ transceiver.
*
......
......@@ -815,7 +815,13 @@ int nrf24l01p_disable_pipe(nrf24l01p_t *dev, nrf24l01p_rx_pipe_t pipe)
return nrf24l01p_write_reg(dev, REG_EN_RXADDR, pipe_conf);
}
int nrf24l01p_disable_crc(nrf24l01p_t *dev)
{
char conf;
nrf24l01p_read_reg(dev, REG_CONFIG, &conf);
return nrf24l01p_write_reg(dev, REG_CONFIG, (conf & ~(EN_CRC)));
}
int nrf24l01p_enable_crc(nrf24l01p_t *dev, nrf24l01p_crc_t crc)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment