Hall Switch 2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
 
Loading...
Searching...
No Matches
GPIORpi Class Reference

#include <hall-pal-rpi.hpp>

Inheritance diagram for GPIORpi:
Collaboration diagram for GPIORpi:

Public Member Functions

 GPIORpi ()
 GPIO Rpi constructor.
 
 GPIORpi (uint8_t pin, uint8_t mode, VLogic_t logic)
 GPIO Rpi default constructor.
 
 ~GPIORpi ()
 GPIO Rpi destructor.
 
HallSwitch::Error_t init ()
 Initializes the Raspberry Pi GPIO.
 
HallSwitch::Error_t deinit ()
 Deinitializes the Raspberry Pi GPIO.
 
HallSwitch::Error_t enableInt (HallSwitch *ptr)
 Enables the Raspberry Pi GPIO interrupt.
 
HallSwitch::Error_t disableInt ()
 Disables the Raspberry Pi GPIO interrupt.
 
IntEvent_t intEvent ()
 Gets the latest Raspberry Pi interrupt event.
 
VLevel_t read ()
 Reads the Raspberry Pi GPIO voltage level.
 
HallSwitch::Error_t write (VLevel_t level)
 Writes the Raspberry Pi GPIO output voltage level.
 
HallSwitch::Error_t enable ()
 Enables the Raspberry Pi GPIO output according to the GPIO logic.
 
HallSwitch::Error_t disable ()
 Disables the Raspberry Pi GPIO output according to the GPIO logic.
 

Constructor & Destructor Documentation

◆ GPIORpi() [1/2]

GPIORpi::GPIORpi ( )

GPIO Rpi constructor.

◆ GPIORpi() [2/2]

GPIORpi::GPIORpi ( uint8_t  pin,
uint8_t  mode,
VLogic_t  logic 
)

GPIO Rpi default constructor.

◆ ~GPIORpi()

GPIORpi::~GPIORpi ( )

GPIO Rpi destructor.

Member Function Documentation

◆ init()

HallSwitch::Error_t GPIORpi::init ( )

Initializes the Raspberry Pi GPIO.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif initialization error

◆ deinit()

HallSwitch::Error_t GPIORpi::deinit ( )

Deinitializes the Raspberry Pi GPIO.

Returns
GPIO error code
Return values
OKalways

◆ enableInt()

HallSwitch::Error_t GPIORpi::enableInt ( HallSwitch ptr)

Enables the Raspberry Pi GPIO interrupt.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif error
Here is the call graph for this function:

◆ disableInt()

HallSwitch::Error_t GPIORpi::disableInt ( )
inline

Disables the Raspberry Pi GPIO interrupt.

Note
Not supported by low level framework.
Returns
GPIO error code
Return values
INTFError always

◆ intEvent()

GPIORpi::IntEvent_t GPIORpi::intEvent ( )
inline

Gets the latest Raspberry Pi interrupt event.

Returns
GPIO interrupt event
Return values
INT_FALLING_EDGEif falling edge event
INT_RISING_EDGEif rising edge event

◆ read()

GPIORpi::VLevel_t GPIORpi::read ( )
inline

Reads the Raspberry Pi GPIO voltage level.

Returns
GPIO voltage level
Return values
GPIO_LOWif voltage low
GPIO_HIGHif voltage high

◆ write()

HallSwitch::Error_t GPIORpi::write ( VLevel_t  level)
inline

Writes the Raspberry Pi GPIO output voltage level.

Parameters
[in]levelVoltage level
Returns
GPIO error code
Return values
OKalways

◆ enable()

HallSwitch::Error_t GPIORpi::enable ( )
inline

Enables the Raspberry Pi GPIO output according to the GPIO logic.

  • Low if negative
  • High if positive
    Returns
    GPIO interrupt event
    Return values
    OKalways

◆ disable()

HallSwitch::Error_t GPIORpi::disable ( )
inline

Disables the Raspberry Pi GPIO output according to the GPIO logic.

  • Low if positive
  • High if negative
    Returns
    GPIO error code
    Return values
    OKalways

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