nrf52_ppi: pass event and task register addresses as uin32_t directly

This commit is contained in:
Matias N 2020-08-24 14:16:47 -03:00 committed by Mateusz Szafoni
parent de40f628bc
commit 46dd4d8d91
2 changed files with 9 additions and 9 deletions

View File

@ -79,33 +79,33 @@ void nrf52_ppi_channel_enable(uint8_t ch, bool enable)
* Name: nrf52_ppi_set_event_ep * Name: nrf52_ppi_set_event_ep
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_event_ep(uint8_t ch, volatile uint32_t *event_reg) void nrf52_ppi_set_event_ep(uint8_t ch, uint32_t event_reg)
{ {
DEBUGASSERT(ch < NRF52_PPI_NUM_CONFIGURABLE_CHANNELS); DEBUGASSERT(ch < NRF52_PPI_NUM_CONFIGURABLE_CHANNELS);
putreg32((uint32_t)event_reg, NRF52_PPI_CHEEP(ch)); putreg32(event_reg, NRF52_PPI_CHEEP(ch));
} }
/**************************************************************************** /****************************************************************************
* Name: nrf52_ppi_set_task_ep * Name: nrf52_ppi_set_task_ep
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_task_ep(uint8_t ch, volatile uint32_t *task_reg) void nrf52_ppi_set_task_ep(uint8_t ch, uint32_t task_reg)
{ {
DEBUGASSERT(ch < NRF52_PPI_NUM_CONFIGURABLE_CHANNELS); DEBUGASSERT(ch < NRF52_PPI_NUM_CONFIGURABLE_CHANNELS);
putreg32((uint32_t)task_reg, NRF52_PPI_CHTEP(ch)); putreg32(task_reg, NRF52_PPI_CHTEP(ch));
} }
/**************************************************************************** /****************************************************************************
* Name: nrf52_ppi_set_task2_ep * Name: nrf52_ppi_set_task2_ep
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_task2_ep(uint8_t ch, volatile uint32_t *task_reg) void nrf52_ppi_set_task2_ep(uint8_t ch, uint32_t task_reg)
{ {
DEBUGASSERT(ch < NRF52_PPI_NUM_CHANNELS); DEBUGASSERT(ch < NRF52_PPI_NUM_CHANNELS);
putreg32((uint32_t)task_reg, NRF52_PPI_FORKTEP(ch)); putreg32(task_reg, NRF52_PPI_FORKTEP(ch));
} }
/**************************************************************************** /****************************************************************************

View File

@ -86,7 +86,7 @@ void nrf52_ppi_channel_enable(uint8_t ch, bool enable);
* *
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_event_ep(uint8_t ch, volatile uint32_t *event_reg); void nrf52_ppi_set_event_ep(uint8_t ch, uint32_t event_reg);
/**************************************************************************** /****************************************************************************
* Name: nrf52_ppi_set_task_ep * Name: nrf52_ppi_set_task_ep
@ -100,7 +100,7 @@ void nrf52_ppi_set_event_ep(uint8_t ch, volatile uint32_t *event_reg);
* *
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_task_ep(uint8_t ch, volatile uint32_t *task_reg); void nrf52_ppi_set_task_ep(uint8_t ch, uint32_t task_reg);
/**************************************************************************** /****************************************************************************
* Name: nrf52_ppi_set_task2_ep * Name: nrf52_ppi_set_task2_ep
@ -114,7 +114,7 @@ void nrf52_ppi_set_task_ep(uint8_t ch, volatile uint32_t *task_reg);
* *
****************************************************************************/ ****************************************************************************/
void nrf52_ppi_set_task2_ep(uint8_t ch, volatile uint32_t *task_reg); void nrf52_ppi_set_task2_ep(uint8_t ch, uint32_t task_reg);
/**************************************************************************** /****************************************************************************
* Name: nrf52_ppi_grp_channel_enable * Name: nrf52_ppi_grp_channel_enable