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

#include <hall-pal-rpi.hpp>

Inheritance diagram for GPIORpi:
Collaboration diagram for GPIORpi:

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from HallSwitch::GPIO
enum  IntEvent_t { INT_FALLING_EDGE = 0, INT_RISING_EDGE = 1 }
 
enum  VLevel_t { GPIO_LOW = 0, GPIO_HIGH = 1 }
 
enum  VLogic_t { NEGATIVE = 1, POSITIVE = 2 }
 

Constructor & Destructor Documentation

GPIORpi::GPIORpi ( )

GPIO Rpi constructor.

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

GPIO Rpi default constructor.

GPIORpi::~GPIORpi ( )

GPIO Rpi destructor.

Member Function Documentation

HallSwitch::Error_t GPIORpi::init ( )
virtual

Initializes the Raspberry Pi GPIO.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif initialization error

Implements HallSwitch::GPIO.

HallSwitch::Error_t GPIORpi::deinit ( )
virtual

Deinitializes the Raspberry Pi GPIO.

Returns
GPIO error code
Return values
OKalways

Implements HallSwitch::GPIO.

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

Enables the Raspberry Pi GPIO interrupt.

Returns
GPIO error code
Return values
OKif success
INTF_ERRORif error

Implements HallSwitch::GPIO.

Here is the call graph for this function:

HallSwitch::Error_t GPIORpi::disableInt ( )
inlinevirtual

Disables the Raspberry Pi GPIO interrupt.

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

Implements HallSwitch::GPIO.

GPIORpi::IntEvent_t GPIORpi::intEvent ( )
inlinevirtual

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

Implements HallSwitch::GPIO.

GPIORpi::VLevel_t GPIORpi::read ( )
inlinevirtual

Reads the Raspberry Pi GPIO voltage level.

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

Implements HallSwitch::GPIO.

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

Writes the Raspberry Pi GPIO output voltage level.

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

Implements HallSwitch::GPIO.

HallSwitch::Error_t GPIORpi::enable ( )
inlinevirtual

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

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

Implements HallSwitch::GPIO.

HallSwitch::Error_t GPIORpi::disable ( )
inlinevirtual

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

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

Implements HallSwitch::GPIO.


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