Hall Switch 2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
 
Loading...
Searching...
No Matches
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
25class GPIOIno : virtual public HallSwitch::Hall_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
52class TimerIno: virtual public HallSpeed::Timer
53{
54 public:
55 TimerIno();
56 ~TimerIno();
62 HallSwitch::Error_t delay (uint32_t timeout);
63
64 private:
65 uint32_t curTime;
66};
67
68#endif
72#endif
73#endif
Definition hall-pal-ino.hpp:26
~GPIOIno()
GPIO Ino destructor.
Definition hall-pal-ino.cpp:40
HallSwitch::Error_t disableInt()
Disables the Arduino GPIO interrupt.
Definition hall-pal-ino.cpp:83
HallSwitch::Error_t enable()
Enables the Arduino GPIO output according to the GPIO logic.
Definition hall-pal-ino.cpp:144
IntEvent_t intEvent()
Gets the latest Arduino interrupt event.
Definition hall-pal-ino.cpp:95
HallSwitch::Error_t write(VLevel_t level)
Writes the Arduino GPIO output voltage level.
Definition hall-pal-ino.cpp:130
HallSwitch::Error_t disable()
Disables the Arduino GPIO output according to the GPIO logic.
Definition hall-pal-ino.cpp:165
VLevel_t read()
Reads the Arduino GPIO voltage level.
Definition hall-pal-ino.cpp:118
HallSwitch::Error_t deinit()
Deinitializes the Arduino GPIO.
Definition hall-pal-ino.cpp:62
HallSwitch::Error_t init()
Initializes the Arduino GPIO.
Definition hall-pal-ino.cpp:51
GPIOIno()
GPIO Ino default constructor.
Definition hall-pal-ino.cpp:20
HallSwitch::Error_t enableInt(HallSwitch *ptr)
Enables the Arduino GPIO interrupt.
Definition hall-pal-ino.cpp:72
Definition hall-pal-timer.hpp:24
Definition hall-pal-gpio.hpp:21
VLevel_t
Definition hall-pal-gpio.hpp:40
IntEvent_t
Definition hall-pal-gpio.hpp:29
VLogic_t
Definition hall-pal-gpio.hpp:51
Definition hall-switch.hpp:23
Error_t
Definition hall-switch.hpp:31
Definition hall-pal-ino.hpp:53
TimerIno()
Definition hall-pal-ino.cpp:180
~TimerIno()
Definition hall-pal-ino.cpp:185
HallSwitch::Error_t elapsed(uint32_t &elapsed)
Elapsed time since the timer was started.
Definition hall-pal-ino.cpp:229
HallSwitch::Error_t start()
Starts the timer.
Definition hall-pal-ino.cpp:217
HallSwitch::Error_t init()
Initialiazes the timer.
Definition hall-pal-ino.cpp:195
HallSwitch::Error_t stop()
Stops the timer.
Definition hall-pal-ino.cpp:241
HallSwitch::Error_t delay(uint32_t timeout)
Introduces a delay during the specified time
Definition hall-pal-ino.cpp:254
HallSwitch::Error_t deinit()
Deinitialiazes the timer.
Definition hall-pal-ino.cpp:206