24 #define PERIPHERAL_VALIDATION 0xF0000000 25 #define VALID_PERIPHERAL 0x40000000 26 #define TASK_EVT_VALIDATION_BIT_POS 8 27 #define TASK_VALIDATION_VAL 0 28 #define EVT_VALIDATION_VAL 0x100 33 if(setup->
ppi_id > MAX_PPI_CH)
37 if(((setup->
event & PERIPHERAL_VALIDATION) != VALID_PERIPHERAL) ||
38 ((setup->
task & PERIPHERAL_VALIDATION) != VALID_PERIPHERAL) ||
39 (((setup->
fork & PERIPHERAL_VALIDATION) != VALID_PERIPHERAL) &&
44 if((setup->
event & (1 << TASK_EVT_VALIDATION_BIT_POS)) != EVT_VALIDATION_VAL)
48 if((setup->
task & (1 << TASK_EVT_VALIDATION_BIT_POS)) != TASK_VALIDATION_VAL)
52 if((setup->
fork & (1 << TASK_EVT_VALIDATION_BIT_POS)) != TASK_VALIDATION_VAL)
62 NRF_PPI->FORK[setup->
ppi_id].TEP = setup->
fork;
70 NRF_PPI->CHENSET |= 1 << ppi_id;
75 NRF_PPI->CHENCLR |= 1 << ppi_id;
80 NRF_PPI->CH[ppi_id].EEP = new_event;
85 NRF_PPI->CH[ppi_id].TEP = new_task;
90 NRF_PPI->FORK[ppi_id].TEP = new_fork;
void hal_ppi_set_fork(uint32_t ppi_id, uint32_t new_fork)
Function to set secondary task for given PPI channel.
void hal_ppi_dis_ch(uint32_t ppi_id)
Function to disable given PPI channel.
ppi_setup_status_t hal_ppi_set(hal_ppi_setup_t *setup)
Function to setup a PPI.
void hal_ppi_set_event(uint32_t ppi_id, uint32_t new_event)
Function to set triggering event for given PPI channel.
void hal_ppi_en_ch(uint32_t ppi_id)
Function to Enable given PPI channel.
void hal_ppi_set_task(uint32_t ppi_id, uint32_t new_task)
Function to change primary task for given PPI channel.