Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You used not defined and not explained pins #2

Open
Uchaplin opened this issue Nov 5, 2024 · 0 comments
Open

You used not defined and not explained pins #2

Uchaplin opened this issue Nov 5, 2024 · 0 comments

Comments

@Uchaplin
Copy link

Uchaplin commented Nov 5, 2024

  1. 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);

}

_

  1. Why you used toggle pin instead of set/unset ? Who knows what it was before ?
  2. 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();
}
}

_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant