Lines Matching refs:p_reg

189 NRF_STATIC_INLINE void nrf_qdec_enable(NRF_QDEC_Type * p_reg);
196 NRF_STATIC_INLINE void nrf_qdec_disable(NRF_QDEC_Type * p_reg);
205 NRF_STATIC_INLINE uint32_t nrf_qdec_enable_get(NRF_QDEC_Type const * p_reg);
214 NRF_STATIC_INLINE void nrf_qdec_int_enable(NRF_QDEC_Type * p_reg, uint32_t mask);
223 NRF_STATIC_INLINE void nrf_qdec_int_disable(NRF_QDEC_Type * p_reg, uint32_t mask);
234 NRF_STATIC_INLINE uint32_t nrf_qdec_int_enable_check(NRF_QDEC_Type const * p_reg, uint32_t mask);
241 NRF_STATIC_INLINE void nrf_qdec_dbfen_enable(NRF_QDEC_Type * p_reg);
248 NRF_STATIC_INLINE void nrf_qdec_dbfen_disable(NRF_QDEC_Type * p_reg);
258 NRF_STATIC_INLINE uint32_t nrf_qdec_dbfen_get(NRF_QDEC_Type const * p_reg);
268 NRF_STATIC_INLINE void nrf_qdec_pins_set(NRF_QDEC_Type * p_reg,
279 NRF_STATIC_INLINE void nrf_qdec_phase_a_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin);
287 NRF_STATIC_INLINE void nrf_qdec_phase_b_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin);
295 NRF_STATIC_INLINE void nrf_qdec_led_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin);
304 NRF_STATIC_INLINE uint32_t nrf_qdec_phase_a_pin_get(NRF_QDEC_Type const * p_reg);
313 NRF_STATIC_INLINE uint32_t nrf_qdec_phase_b_pin_get(NRF_QDEC_Type const * p_reg);
322 NRF_STATIC_INLINE uint32_t nrf_qdec_led_pin_get(NRF_QDEC_Type const * p_reg);
330 NRF_STATIC_INLINE void nrf_qdec_task_trigger(NRF_QDEC_Type * p_reg, nrf_qdec_task_t task);
340 NRF_STATIC_INLINE uint32_t nrf_qdec_task_address_get(NRF_QDEC_Type const * p_reg,
349 NRF_STATIC_INLINE void nrf_qdec_event_clear(NRF_QDEC_Type * p_reg, nrf_qdec_event_t event);
359 NRF_STATIC_INLINE bool nrf_qdec_event_check(NRF_QDEC_Type const * p_reg, nrf_qdec_event_t event);
369 NRF_STATIC_INLINE uint32_t nrf_qdec_event_address_get(NRF_QDEC_Type const * p_reg,
378 NRF_STATIC_INLINE void nrf_qdec_shorts_enable(NRF_QDEC_Type * p_reg, uint32_t mask);
386 NRF_STATIC_INLINE void nrf_qdec_shorts_disable(NRF_QDEC_Type * p_reg, uint32_t mask);
404 NRF_STATIC_INLINE void nrf_qdec_sampleper_set(NRF_QDEC_Type * p_reg,
414 NRF_STATIC_INLINE nrf_qdec_sampleper_t nrf_qdec_sampleper_get(NRF_QDEC_Type const * p_reg);
423 NRF_STATIC_INLINE int32_t nrf_qdec_sample_get(NRF_QDEC_Type const * p_reg);
432 NRF_STATIC_INLINE int32_t nrf_qdec_acc_get(NRF_QDEC_Type const * p_reg);
441 NRF_STATIC_INLINE int32_t nrf_qdec_accread_get(NRF_QDEC_Type const * p_reg);
450 NRF_STATIC_INLINE uint32_t nrf_qdec_accdbl_get(NRF_QDEC_Type const * p_reg);
459 NRF_STATIC_INLINE uint32_t nrf_qdec_accdblread_get(NRF_QDEC_Type const * p_reg);
468 NRF_STATIC_INLINE void nrf_qdec_ledpre_set(NRF_QDEC_Type * p_reg, uint32_t time_us);
477 NRF_STATIC_INLINE uint32_t nrf_qdec_ledpre_get(NRF_QDEC_Type const * p_reg);
485 NRF_STATIC_INLINE void nrf_qdec_reportper_set(NRF_QDEC_Type * p_reg,
495 NRF_STATIC_INLINE nrf_qdec_reportper_t nrf_qdec_reportper_get(NRF_QDEC_Type const * p_reg);
512 NRF_STATIC_INLINE void nrf_qdec_ledpol_set(NRF_QDEC_Type * p_reg, nrf_qdec_ledpol_t pol);
521 NRF_STATIC_INLINE uint32_t nrf_qdec_ledpol_get(NRF_QDEC_Type const * p_reg);
526 NRF_STATIC_INLINE void nrf_qdec_enable(NRF_QDEC_Type * p_reg) in nrf_qdec_enable() argument
528 p_reg->ENABLE = NRF_QDEC_ENABLE; in nrf_qdec_enable()
531 NRF_STATIC_INLINE void nrf_qdec_disable(NRF_QDEC_Type * p_reg) in nrf_qdec_disable() argument
533 p_reg->ENABLE = NRF_QDEC_DISABLE; in nrf_qdec_disable()
536 NRF_STATIC_INLINE uint32_t nrf_qdec_enable_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_enable_get() argument
538 return p_reg->ENABLE; in nrf_qdec_enable_get()
541 NRF_STATIC_INLINE void nrf_qdec_int_enable(NRF_QDEC_Type * p_reg, uint32_t mask) in nrf_qdec_int_enable() argument
543 p_reg->INTENSET = mask; // writing 0 has no effect in nrf_qdec_int_enable()
546 NRF_STATIC_INLINE void nrf_qdec_int_disable(NRF_QDEC_Type * p_reg, uint32_t mask) in nrf_qdec_int_disable() argument
548 p_reg->INTENCLR = mask; // writing 0 has no effect in nrf_qdec_int_disable()
551 NRF_STATIC_INLINE uint32_t nrf_qdec_int_enable_check(NRF_QDEC_Type const * p_reg, uint32_t mask) in nrf_qdec_int_enable_check() argument
553 return p_reg->INTENSET & mask; // when read this register will return the value of INTEN. in nrf_qdec_int_enable_check()
556 NRF_STATIC_INLINE void nrf_qdec_dbfen_enable(NRF_QDEC_Type * p_reg) in nrf_qdec_dbfen_enable() argument
558 p_reg->DBFEN = NRF_QDEC_DBFEN_ENABLE; in nrf_qdec_dbfen_enable()
561 NRF_STATIC_INLINE void nrf_qdec_dbfen_disable(NRF_QDEC_Type * p_reg) in nrf_qdec_dbfen_disable() argument
563 p_reg->DBFEN = NRF_QDEC_DBFEN_DISABLE; in nrf_qdec_dbfen_disable()
566 NRF_STATIC_INLINE uint32_t nrf_qdec_dbfen_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_dbfen_get() argument
568 return p_reg->DBFEN; in nrf_qdec_dbfen_get()
571 NRF_STATIC_INLINE void nrf_qdec_pins_set(NRF_QDEC_Type * p_reg, in nrf_qdec_pins_set() argument
577 p_reg->PSEL.A = phase_a_pin; in nrf_qdec_pins_set()
579 p_reg->PSELA = phase_a_pin; in nrf_qdec_pins_set()
583 p_reg->PSEL.B = phase_b_pin; in nrf_qdec_pins_set()
585 p_reg->PSELB = phase_b_pin; in nrf_qdec_pins_set()
589 p_reg->PSEL.LED = led_pin; in nrf_qdec_pins_set()
591 p_reg->PSELLED = led_pin; in nrf_qdec_pins_set()
595 NRF_STATIC_INLINE void nrf_qdec_phase_a_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin) in nrf_qdec_phase_a_pin_set() argument
598 p_reg->PSEL.A = pin; in nrf_qdec_phase_a_pin_set()
600 p_reg->PSELA = pin; in nrf_qdec_phase_a_pin_set()
604 NRF_STATIC_INLINE void nrf_qdec_phase_b_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin) in nrf_qdec_phase_b_pin_set() argument
607 p_reg->PSEL.B = pin; in nrf_qdec_phase_b_pin_set()
609 p_reg->PSELB = pin; in nrf_qdec_phase_b_pin_set()
613 NRF_STATIC_INLINE void nrf_qdec_led_pin_set(NRF_QDEC_Type * p_reg, uint32_t pin) in nrf_qdec_led_pin_set() argument
616 p_reg->PSEL.LED = pin; in nrf_qdec_led_pin_set()
618 p_reg->PSELLED = pin; in nrf_qdec_led_pin_set()
622 NRF_STATIC_INLINE uint32_t nrf_qdec_phase_a_pin_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_phase_a_pin_get() argument
625 return p_reg->PSEL.A; in nrf_qdec_phase_a_pin_get()
627 return p_reg->PSELA; in nrf_qdec_phase_a_pin_get()
631 NRF_STATIC_INLINE uint32_t nrf_qdec_phase_b_pin_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_phase_b_pin_get() argument
634 return p_reg->PSEL.B; in nrf_qdec_phase_b_pin_get()
636 return p_reg->PSELB; in nrf_qdec_phase_b_pin_get()
640 NRF_STATIC_INLINE uint32_t nrf_qdec_led_pin_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_led_pin_get() argument
643 return p_reg->PSEL.LED; in nrf_qdec_led_pin_get()
645 return p_reg->PSELLED; in nrf_qdec_led_pin_get()
649 NRF_STATIC_INLINE void nrf_qdec_task_trigger(NRF_QDEC_Type * p_reg, nrf_qdec_task_t task) in nrf_qdec_task_trigger() argument
651 *( (volatile uint32_t *)( (uint8_t *)p_reg + (uint32_t)task) ) = 1; in nrf_qdec_task_trigger()
654 NRF_STATIC_INLINE uint32_t nrf_qdec_task_address_get(NRF_QDEC_Type const * p_reg, in nrf_qdec_task_address_get() argument
657 return nrf_task_event_address_get(p_reg, task); in nrf_qdec_task_address_get()
660 NRF_STATIC_INLINE void nrf_qdec_event_clear(NRF_QDEC_Type * p_reg, nrf_qdec_event_t event) in nrf_qdec_event_clear() argument
662 *( (volatile uint32_t *)( (uint8_t *)p_reg + (uint32_t)event) ) = 0; in nrf_qdec_event_clear()
663 nrf_event_readback((uint8_t *)p_reg + (uint32_t)event); in nrf_qdec_event_clear()
666 NRF_STATIC_INLINE bool nrf_qdec_event_check(NRF_QDEC_Type const * p_reg, nrf_qdec_event_t event) in nrf_qdec_event_check() argument
668 return nrf_event_check(p_reg, event); in nrf_qdec_event_check()
671 NRF_STATIC_INLINE uint32_t nrf_qdec_event_address_get(NRF_QDEC_Type const * p_reg, in nrf_qdec_event_address_get() argument
674 return nrf_task_event_address_get(p_reg, event); in nrf_qdec_event_address_get()
677 NRF_STATIC_INLINE void nrf_qdec_shorts_enable(NRF_QDEC_Type * p_reg, uint32_t mask) in nrf_qdec_shorts_enable() argument
679 p_reg->SHORTS |= mask; in nrf_qdec_shorts_enable()
682 NRF_STATIC_INLINE void nrf_qdec_shorts_disable(NRF_QDEC_Type * p_reg, uint32_t mask) in nrf_qdec_shorts_disable() argument
684 p_reg->SHORTS &= ~mask; in nrf_qdec_shorts_disable()
692 NRF_STATIC_INLINE void nrf_qdec_sampleper_set(NRF_QDEC_Type * p_reg, in nrf_qdec_sampleper_set() argument
695 p_reg->SAMPLEPER = sampleper; in nrf_qdec_sampleper_set()
698 NRF_STATIC_INLINE nrf_qdec_sampleper_t nrf_qdec_sampleper_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_sampleper_get() argument
700 return (nrf_qdec_sampleper_t)(p_reg->SAMPLEPER); in nrf_qdec_sampleper_get()
703 NRF_STATIC_INLINE int32_t nrf_qdec_sample_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_sample_get() argument
705 return p_reg->SAMPLE; in nrf_qdec_sample_get()
708 NRF_STATIC_INLINE int32_t nrf_qdec_acc_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_acc_get() argument
710 return p_reg->ACC; in nrf_qdec_acc_get()
713 NRF_STATIC_INLINE int32_t nrf_qdec_accread_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_accread_get() argument
715 return p_reg->ACCREAD; in nrf_qdec_accread_get()
718 NRF_STATIC_INLINE uint32_t nrf_qdec_accdbl_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_accdbl_get() argument
720 return p_reg->ACCDBL; in nrf_qdec_accdbl_get()
723 NRF_STATIC_INLINE uint32_t nrf_qdec_accdblread_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_accdblread_get() argument
725 return p_reg->ACCDBLREAD; in nrf_qdec_accdblread_get()
728 NRF_STATIC_INLINE void nrf_qdec_ledpre_set(NRF_QDEC_Type * p_reg, uint32_t time_us) in nrf_qdec_ledpre_set() argument
730 p_reg->LEDPRE = time_us; in nrf_qdec_ledpre_set()
733 NRF_STATIC_INLINE uint32_t nrf_qdec_ledpre_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_ledpre_get() argument
735 return p_reg->LEDPRE; in nrf_qdec_ledpre_get()
738 NRF_STATIC_INLINE void nrf_qdec_reportper_set(NRF_QDEC_Type * p_reg, in nrf_qdec_reportper_set() argument
741 p_reg->REPORTPER = reportper; in nrf_qdec_reportper_set()
744 NRF_STATIC_INLINE nrf_qdec_reportper_t nrf_qdec_reportper_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_reportper_get() argument
746 return (nrf_qdec_reportper_t)(p_reg->REPORTPER); in nrf_qdec_reportper_get()
754 NRF_STATIC_INLINE void nrf_qdec_ledpol_set(NRF_QDEC_Type * p_reg, nrf_qdec_ledpol_t pol) in nrf_qdec_ledpol_set() argument
756 p_reg->LEDPOL = pol; in nrf_qdec_ledpol_set()
759 NRF_STATIC_INLINE uint32_t nrf_qdec_ledpol_get(NRF_QDEC_Type const * p_reg) in nrf_qdec_ledpol_get() argument
761 return p_reg->LEDPOL; in nrf_qdec_ledpol_get()