Hall Switch  2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
hall-pal-rpi.hpp
Go to the documentation of this file.
1 
10 #ifndef HALL_SWITCH_RPI_HPP_
11 #define HALL_SWITCH_RPI_HPP_
12 
13 #include "../../../config/hall-conf.hpp"
14 
15 #if (HALL_SWITCH_FRAMEWORK == HALL_SWITCH_FRMWK_RPI)
16 
17 #include "../../../pal/hall-pal-gpio.hpp"
18 #include <wiringPi.h>
19 
25 class GPIORpi : virtual public HallSwitch::GPIO
26 {
27  private:
28  #define UNUSED_PIN 0xFF
29  uint8_t pin;
30  uint8_t mode;
31  VLogic_t logic;
33  public:
34  GPIORpi ();
35  GPIORpi (uint8_t pin,
36  uint8_t mode,
37  VLogic_t logic);
38  ~GPIORpi ();
44  VLevel_t read ();
48 };
49 
52 #endif
53 #endif
HallSwitch::Error_t enableInt(HallSwitch *ptr)
Enables the Raspberry Pi GPIO interrupt.
Definition: hall-pal-rpi.cpp:78
HallSwitch::Error_t deinit()
Deinitializes the Raspberry Pi GPIO.
Definition: hall-pal-rpi.cpp:67
HallSwitch::Error_t write(VLevel_t level)
Writes the Raspberry Pi GPIO output voltage level.
Definition: hall-pal-rpi.cpp:138
Error_t
Definition: hall-switch.hpp:30
Definition: hall-pal-rpi.hpp:25
~GPIORpi()
GPIO Rpi destructor.
Definition: hall-pal-rpi.cpp:39
HallSwitch::Error_t init()
Initializes the Raspberry Pi GPIO.
Definition: hall-pal-rpi.cpp:51
HallSwitch::Error_t disable()
Disables the Raspberry Pi GPIO output according to the GPIO logic.
Definition: hall-pal-rpi.cpp:171
VLevel_t
Definition: hall-pal-gpio.hpp:39
Definition: hall-switch.hpp:22
VLogic_t
Definition: hall-pal-gpio.hpp:50
VLevel_t read()
Reads the Raspberry Pi GPIO voltage level.
Definition: hall-pal-rpi.cpp:127
IntEvent_t
Definition: hall-pal-gpio.hpp:28
IntEvent_t intEvent()
Gets the latest Raspberry Pi interrupt event.
Definition: hall-pal-rpi.cpp:104
HallSwitch::Error_t disableInt()
Disables the Raspberry Pi GPIO interrupt.
Definition: hall-pal-rpi.cpp:93
Definition: hall-pal-gpio.hpp:20
HallSwitch::Error_t enable()
Enables the Raspberry Pi GPIO output according to the GPIO logic.
Definition: hall-pal-rpi.cpp:151
GPIORpi()
GPIO Rpi constructor.
Definition: hall-pal-rpi.cpp:30