nrfcxx  0.1.0
C++-17 Framework for Nordic nRF5 Devices
Public Types | Static Public Member Functions | Static Protected Member Functions
nrfcxx::periph::PPI Class Reference

Resource allocation manager for PPI module. More...

#include <nrfcxx/periph.hpp>

Public Types

using event_reference_type = __O uint32_t &
 Type for a reference to a peripheral event.
 
using task_reference_type = __IO uint32_t &
 Type for a reference to a peripheral task.
 

Static Public Member Functions

static int request ()
 Allocate a PPI channel for application use. More...
 
static int release (int ppi)
 Release a previously allocated PPI channel. More...
 
static int group_request ()
 Allocate a PPI channel group for application use. More...
 
static int group_release (int ppi)
 Release a previously allocated PPI channel group. More...
 
static uint32_t configure (int ppidx, event_reference_type eep, task_reference_type tep)
 Configure a PPI channel. More...
 
static uint32_t CHENSET (uint32_t v)
 Abstraction to enable a set of PPI channels.
 
static uint32_t CHENCLR (uint32_t v)
 Abstraction to disable a set of PPI channels.
 
static uint32_t CHEN ()
 Abstraction to read the set of enabled PPI channels.
 

Static Protected Member Functions

static uint32_t CHENSET_ (uint32_t v)
 
static uint32_t CHENCLR_ (uint32_t v)
 
static uint32_t CHEN_ ()
 
static uint32_t configure_ (int ppidx, event_reference_type eep, task_reference_type tep)
 

Detailed Description

Resource allocation manager for PPI module.

Used to avoid the need for compile-time assignment of channels or channel groups to functions. Also provides an abstraction that will ultimately support the supervisor calls required for soft devices.

Member Function Documentation

◆ configure()

static uint32_t nrfcxx::periph::PPI::configure ( int  ppidx,
event_reference_type  eep,
task_reference_type  tep 
)
inlinestatic

Configure a PPI channel.

Parameters
ppidxan PPI channel index as returned from request()
eepthe event endpoint of the connection
tepthe task endpoint of the connection
Returns
0 on success, or a nonzero error code

◆ group_release()

static int nrfcxx::periph::PPI::group_release ( int  ppi)
static

Release a previously allocated PPI channel group.

Returns
0 on success, or a negative error code.

◆ group_request()

static int nrfcxx::periph::PPI::group_request ( )
static

Allocate a PPI channel group for application use.

Returns
the PPI channel group index, or a negative error code.

◆ release()

static int nrfcxx::periph::PPI::release ( int  ppi)
static

Release a previously allocated PPI channel.

Returns
0 on success, or a negative error code.

◆ request()

static int nrfcxx::periph::PPI::request ( )
static

Allocate a PPI channel for application use.

Returns
the PPI channel index, or a negative error code.

The documentation for this class was generated from the following file: