#include <bound_box.h>
◆ Bound() [1/3]
◆ Bound() [2/3]
◆ Bound() [3/3]
◆ ~Bound()
◆ add_LimitSwitch()
template<uint8_t N>
| void Bound< N >::add_LimitSwitch |
( |
GPIO_TypeDef * |
gpio, |
|
|
uint16_t |
pin |
|
) |
| |
|
inline |
Add limit switch gpio to the bound.
\func add_LimitSwitch
- Parameters
-
| gpio | Pointer to the gpio the limit switch is connected to(eg. GPIOA) |
| pin | The number of gpio pin(eg. GPIO_PIN_0) |
\ret 1 if buffer to hold gpio is full and 0 if gpio is correctly added
- Note
- The order of addition of limit switch matters.
◆ clear()
template<uint8_t N>
| void Bound< N >::clear |
( |
| ) |
|
|
inline |
◆ get_Num_Switches()
template<uint8_t N>
| uint8_t Bound< N >::get_Num_Switches |
( |
| ) |
|
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ read()
template<uint8_t N>
| uint8_t Bound< N >::read |
( |
| ) |
|
|
inline |
Read which limit switches are pressed.
\func read
- Parameters
-
| none | \ret 1 in place of limit switch pressed. If 0x0F is retured, the first added 4 limit switch are pressed and rest are not. |
- Note
- The order of addition of limit switch matters.
◆ update()
template<uint8_t N>
| void Bound< N >::update |
( |
| ) |
|
|
inline |
◆ gpio_pins_
template<uint8_t N>
| uint16_t Bound< N >::gpio_pins_[N] |
|
private |
◆ gpios_
template<uint8_t N>
| GPIO_TypeDef* Bound< N >::gpios_[N] |
|
private |
◆ num_switches_
template<uint8_t N>
| uint8_t Bound< N >::num_switches_ |
|
private |
◆ switch_state_
template<uint8_t N>
| uint8_t Bound< N >::switch_state_ |
|
private |
The documentation for this class was generated from the following file:
- C:/Users/073be/OneDrive/Documents/Robotics/Codes/beta/Khangai-Robot/Khangai-Robot-Full/KhangaiRobot-Play/Core/Inc/parts/sensors/bound_box.h