TLE5012B  3.1.0
The TLE5012B is a pre-calibrated 360° angle sensor that detects the orientation of a magnetic field. The raw signals (sine and cosine) are digitally processed internally to calculate the angle orientation of the magnetic field (magnet).
gpio-mtb.hpp
Go to the documentation of this file.
1 
11 #ifndef GPIO_MTB_HPP_
12 #define GPIO_MTB_HPP_
13 
14 #include "../../../config/tle5012-conf.hpp"
15 
16 #if (TLE5012_FRAMEWORK == TLE5012_FRMWK_MTB)
17 
18 #include "../../../pal/gpio.hpp"
19 #include <mtb_platform.h>
20 
26 class GPIOMtb : virtual public GPIO
27 {
28  private:
29  #define UNUSED_PIN (mtb_gpio_t)(MTB_GPIO_51 + 1)
30  mtb_gpio_t pin;
31  mtb_gpio_config_t config;
32  VLogic_t logic;
34  public:
35  GPIOMtb();
36  GPIOMtb(mtb_gpio_t pin, mtb_gpio_config_t config, VLogic_t logic);
37  ~GPIOMtb();
38  Error_t init();
39  Error_t deinit();
40  VLevel_t read();
41  Error_t write(VLevel_t level);
42  Error_t enable();
43  Error_t disable();
44 };
45 
46 
49 #endif
50 #endif
Error_t enable()
Enables the MTB output according to the GPIO logic.
Definition: gpio-mtb.cpp:112
Error_t disable()
Disables the MTB output according to the GPIO logic.
Definition: gpio-mtb.cpp:137
Error_t deinit()
Initializes the MTB GPIO.
Definition: gpio-mtb.cpp:59
VLevel_t read()
Reads the MTB GPIO voltage level.
Definition: gpio-mtb.cpp:74
GPIOMtb()
GPIO MTB default constructor.
Definition: gpio-mtb.cpp:25
Error_t write(VLevel_t level)
Writes the MTB GPIO output voltage level.
Definition: gpio-mtb.cpp:86
~GPIOMtb()
GPIO MTB destructor.
Definition: gpio-mtb.cpp:32
Error_t init()
Initializes the MTB GPIO.
Definition: gpio-mtb.cpp:44
Definition: gpio-mtb.hpp:27
VLevel_t
Definition: gpio.hpp:49
VLogic_t
Definition: gpio.hpp:60
Error_t
Definition: gpio.hpp:25
Definition: gpio.hpp:21