arch/nrf5x/peripheral.h header reference
[nRF5X platform module]
The source code of this header can be browsed online.
Description [link]
Inside a device register map, there are tasks, events, shorts, interrupt handling, and then configuration registers.
This regular pattern explains why nRF5x architecture declaration adds an overlay on top of cpu_mem_read_32 and cpu_mem_write_32 to access hardware registers. nRF5x code use the following accessors:
All these accessors take device base address and task/event/register number as arguments. These accessors make the code obvious about what the driver intends to do.
Members [link]
Functions [link]
- uint32_t nrf_event_check(uintptr_t base, uint8_t event)
- void nrf_event_clear(uintptr_t base, uint8_t event)
- void nrf_event_wait(uintptr_t base, uint8_t event)
- void nrf_event_wait_clear(uintptr_t base, uint8_t event)
- void nrf_evt_disable(uintptr_t base, uint8_t evt)
- void nrf_evt_disable_mask(uintptr_t base, uint32_t mask)
- void nrf_evt_enable(uintptr_t base, uint8_t evt)
- void nrf_evt_enable_mask(uintptr_t base, uint32_t mask)
- bool_t nrf_evt_is_enabled(uintptr_t base, uint8_t evt)
- void nrf_it_disable(uintptr_t base, uint8_t it)
- void nrf_it_disable_mask(uintptr_t base, uint32_t mask)
- void nrf_it_enable(uintptr_t base, uint8_t it)
- void nrf_it_enable_mask(uintptr_t base, uint32_t mask)
- bool_t nrf_it_is_enabled(uintptr_t base, uint8_t it)
- void nrf_it_set_mask(uintptr_t base, uint32_t mask)
- uint32_t nrf_reg_get(uintptr_t base, uint16_t id)
- void nrf_reg_set(uintptr_t base, uint16_t id, uint32_t data)
- void nrf_short_disable(uintptr_t base, uint8_t id)
- void nrf_short_disable_mask(uintptr_t base, uint32_t mask)
- void nrf_short_enable(uintptr_t base, uint8_t id)
- void nrf_short_enable_mask(uintptr_t base, uint32_t mask)
- uint32_t nrf_short_get(uintptr_t base)
- bool_t nrf_short_is_enabled(uintptr_t base, uint8_t id)
- void nrf_short_set(uintptr_t base, uint32_t shorts)
- void nrf_task_trigger(uintptr_t base, uint8_t task)
Members detail [link]
#define ARCH_NRF_PERIPHERAL_H_ [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 21.
This function is declared in arch/nrf5x/peripheral.h source file, line 325.
this function checks whether event event is currently pending for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 336.
this function acknowledges event event for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 347.
this function busy-waits for event event from device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 370.
this function busy-waits for event event from device at base address addr and acknowledges it.
This function is declared in arch/nrf5x/peripheral.h source file, line 211.
this function removes event it from enabled event list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 200.
this function removes events in mask mask from enabled event list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 190.
this function adds event it in enabled event list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 179.
this function adds events in mask mask to enabled event list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 168.
this function checks whether event evt is enabled for peripheral at base address base.
This function is declared in arch/nrf5x/peripheral.h source file, line 158.
this function removes interrupt it from enabled interrupt list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 140.
this function removes interrupts in mask mask from enabled interrupt list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 130.
this function adds interrupt it in interrupt list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 116.
this function adds interrupts in mask mask to enabled interrupt list for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 94.
this function checks whether interrupt it for peripheral at base address base is enabled.
This function is declared in arch/nrf5x/peripheral.h source file, line 105.
this function updates the interrupt mask of device at base address base with mask mask.
This function is declared in arch/nrf5x/peripheral.h source file, line 221.
this function retrieves value register id in device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 232.
this function sets register id to value data in device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 315.
this function removes short id from current short enable mask for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 297.
this function removes shorts in mask mask from current short enable mask for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 276.
this function adds short id in current short enable mask for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 265.
this function adds shorts in mask mask to current short enable mask for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 243.
this function retrieves current short enable mask for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 286.
this function checks whether short id is enabled for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 254.
this function sets current short enable mask to shorts for device at base address addr.
This function is declared in arch/nrf5x/peripheral.h source file, line 83.
this function triggers task task for peripheral at base address base.
#define NRF_EVENT [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 66.
This macro is for internal use only.
#define NRF_EVTEN [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 71.
This macro is for internal use only.
#define NRF_EVTENCLR [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 73.
This macro is for internal use only.
#define NRF_EVTENSET [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 72.
This macro is for internal use only.
#define NRF_INTEN [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 68.
This macro is for internal use only.
#define NRF_INTENCLR [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 70.
This macro is for internal use only.
#define NRF_INTENSET [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 69.
This macro is for internal use only.
#define NRF_REGISTER [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 74.
This macro is for internal use only.
#define NRF_SHORT [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 67.
This macro is for internal use only.
#define NRF_TASK [link]
This macro is declared in arch/nrf5x/peripheral.h source file, line 65.
This macro is for internal use only.