Embedded Artistry Framework
Embedded Systems C++ Framework
Static Public Member Functions | List of all members
nRFPinID< TPort, TPin > Class Template Reference

Convenience class used to provide a Port and Pin for later ID. More...

#include <nrf_gpio.hpp>

Static Public Member Functions

static constexpr uint8_t port () noexcept
 
static constexpr uint8_t pin () noexcept
 

Detailed Description

template<uint8_t TPort, uint8_t TPin>
class nRFPinID< TPort, TPin >

Convenience class used to provide a Port and Pin for later ID.

Example usage can be found in nrf_i2c.hpp. The nRFi2cMaster class is templated off of two pins: SCL pin and SDA. Using the nRFPinID class, we do not need intermediary GPIO objects. The I2C class can get the port and pin numbers directly. These numbers are used to configure the device and pins.

Template Parameters
TPortthe GPIO Bank.
TPinthe pin within the selected GPIO bank.

Member Function Documentation

◆ pin()

template<uint8_t TPort, uint8_t TPin>
static constexpr uint8_t nRFPinID< TPort, TPin >::pin ( )
inlinestaticnoexcept

◆ port()

template<uint8_t TPort, uint8_t TPin>
static constexpr uint8_t nRFPinID< TPort, TPin >::port ( )
inlinestaticnoexcept

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