Hall Switch  2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
hall-pal-ino.hpp
Go to the documentation of this file.
1 
10 #ifndef HALL_SWITCH_ARD_HPP_
11 #define HALL_SWITCH_ARD_HPP_
12 
13 #include "../../../config/hall-conf.hpp"
14 
15 #if (HALL_SWITCH_FRAMEWORK == HALL_SWITCH_FRMWK_ARDUINO)
16 
17 #include "../../../pal/hall-pal-gpio.hpp"
18 #include "../../../pal/hall-pal-timer.hpp"
19 
25 class GPIOIno : 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  GPIOIno ();
35  GPIOIno (uint8_t pin,
36  uint8_t mode,
37  VLogic_t logic);
38  ~GPIOIno ();
44  VLevel_t read ();
48 };
49 
50 #if (HALL_SPEED_ENABLED == 1)
51 
52 class TimerIno: virtual public HallSpeed::Timer
53 {
54  public:
55  TimerIno();
56  ~TimerIno();
59  HallSwitch::Error_t start ();
60  HallSwitch::Error_t elapsed (uint32_t &elapsed);
61  HallSwitch::Error_t stop ();
62  HallSwitch::Error_t delay (uint32_t timeout);
63 
64  private:
65  uint32_t curTime;
66 };
67 
68 #endif
72 #endif
73 #endif
GPIOIno()
GPIO Ino default constructor.
Definition: hall-pal-ino.cpp:20
HallSwitch::Error_t disable()
Disables the Arduino GPIO output according to the GPIO logic.
Definition: hall-pal-ino.cpp:165
Definition: hall-pal-ino.hpp:52
Error_t
Definition: hall-switch.hpp:30
Definition: hall-pal-timer.hpp:23
HallSwitch::Error_t enable()
Enables the Arduino GPIO output according to the GPIO logic.
Definition: hall-pal-ino.cpp:144
~GPIOIno()
GPIO Ino destructor.
Definition: hall-pal-ino.cpp:40
HallSwitch::Error_t write(VLevel_t level)
Writes the Arduino GPIO output voltage level.
Definition: hall-pal-ino.cpp:130
IntEvent_t intEvent()
Gets the latest Arduino interrupt event.
Definition: hall-pal-ino.cpp:95
Definition: hall-pal-ino.hpp:25
VLevel_t read()
Reads the Arduino GPIO voltage level.
Definition: hall-pal-ino.cpp:118
HallSwitch::Error_t enableInt(HallSwitch *ptr)
Enables the Arduino GPIO interrupt.
Definition: hall-pal-ino.cpp:72
VLevel_t
Definition: hall-pal-gpio.hpp:39
Definition: hall-switch.hpp:22
VLogic_t
Definition: hall-pal-gpio.hpp:50
HallSwitch::Error_t deinit()
Deinitializes the Arduino GPIO.
Definition: hall-pal-ino.cpp:62
IntEvent_t
Definition: hall-pal-gpio.hpp:28
Definition: hall-pal-gpio.hpp:20
HallSwitch::Error_t init()
Initializes the Arduino GPIO.
Definition: hall-pal-ino.cpp:51
HallSwitch::Error_t disableInt()
Disables the Arduino GPIO interrupt.
Definition: hall-pal-ino.cpp:83