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).
timer.hpp
Go to the documentation of this file.
1 
10 #ifndef TIMER_HPP_
11 #define TIMER_HPP_
12 
13 #include <stdint.h>
14 
20 class Timer
21 {
22  public:
23 
24  enum Error_t
25  {
26  OK = 0,
27  ERROR = 1,
28  };
29 
36  virtual Error_t init () = 0;
37 
44  virtual Error_t deinit () = 0;
45 
52  virtual Error_t start () = 0;
53 
61  virtual Error_t elapsed (uint32_t &elapsed) = 0;
62 
69  virtual Error_t stop () = 0;
70 
78  virtual Error_t delayMilli (uint32_t timeout) = 0;
79 
87  virtual Error_t delayMicro (uint32_t timeout) = 0;
88 };
89 
92 #endif
virtual Error_t elapsed(uint32_t &elapsed)=0
Elapsed time since the timer was started.
virtual Error_t start()=0
Starts the timer.
Error_t
Definition: timer.hpp:25
@ OK
Definition: timer.hpp:26
@ ERROR
Definition: timer.hpp:27
virtual Error_t delayMicro(uint32_t timeout)=0
Introduces a delay during the specified time.
virtual Error_t deinit()=0
Deinitialize the timer.
virtual Error_t stop()=0
Stops the timer.
virtual Error_t init()=0
Initialize the timer.
virtual Error_t delayMilli(uint32_t timeout)=0
Introduces a delay during the specified time.
Definition: timer.hpp:21