JM9 XRCU Board 0.1.3a
Libraries API Reference
Loading...
Searching...
No Matches
Uts_gpio_int.h
Go to the documentation of this file.
1
8
9#ifndef UTS_GPIO_INT_H
10#define UTS_GPIO_INT_H
11
12#include <Arduino.h>
13
14#include <Uts_gpio.h>
15
24class Uts_gpio_int : public Uts_gpio {
25 private:
29 volatile unsigned long echo_rise_micros;
30
34 volatile unsigned long echo_fall_micros;
35
39 void echo_level_changed_callback ();
40
44 friend void uts_gpio_int_echo_change_genc ();
45
49 friend void JM9_uts_gpio_int_callback ();
50
56 bool send_trig ();
57
63 bool update ();
64
65 public:
71 Uts_gpio_int (const uint8_t init_port);
72
81 bool begin ();
82
89 void end ();
90
96 uint16_t read_dist_mm ();
97};
98
99#endif // #ifndef UTS_GPIO_INT_H
Uts_gpio_int(const uint8_t init_port)
Creates a new Uts_gpio_int object.
Definition Uts_gpio_int.cpp:19
friend void uts_gpio_int_echo_change_genc()
Friend for GPIO interrupt to call echo_level_changed_callback().
Definition Uts_gpio_int.cpp:123
bool begin()
Activates this ultrasonic sensor.
Definition Uts_gpio_int.cpp:27
uint16_t read_dist_mm()
Reads the distance between this ultrasonic sensor and the obstacle in front of it.
Definition Uts_gpio_int.cpp:73
void end()
Deactivates this ultrasonic sensor.
Definition Uts_gpio_int.cpp:51
friend void JM9_uts_gpio_int_callback()
Friend for low-frequency regular callback.
Definition Uts_gpio_int.cpp:127
Uts_gpio(const uint8_t init_port)
Creates a new Uts_gpio object.
Definition Uts_gpio.cpp:12