stm32_hal_nrf24l01p
stm32_hal_nrf24l01p copied to clipboard
You used not defined and not explained pins
- Why you not declared this pin :
_
void nrf24l01p_rx_receive(uint8_t* rx_payload) { nrf24l01p_read_rx_fifo(rx_payload); nrf24l01p_clear_rx_dr();
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);}
_
- Why you used toggle pin instead of set/unset ? Who knows what it was before ?
- Same in this place _
void nrf24l01p_tx_irq() { uint8_t tx_ds = nrf24l01p_get_status(); tx_ds &= 0x20; if(tx_ds) {
// TX_DS HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); nrf24l01p_clear_tx_ds(); } else { // MAX_RT HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, SET); nrf24l01p_clear_max_rt(); } }
_