satnogs-rotator-firmware
Loading...
Searching...
No Matches
endstop Class Reference

Class that functions for interacting with end-stop. More...

#include <endstop.h>

Public Member Functions

 endstop (uint8_t pin, bool default_state)
 
void init ()
 Initialize the Input pin for end-stop.
 
bool get_state ()
 Get the state of end-stop.
 

Private Attributes

uint8_t _pin
 
bool _default_state
 

Detailed Description

Class that functions for interacting with end-stop.

Parameters
pinSet the arduino pin
default_stateSet the default state of end-stop HIGH or LOW

Definition at line 24 of file endstop.h.

Constructor & Destructor Documentation

◆ endstop()

endstop::endstop ( uint8_t pin,
bool default_state )
inline

Definition at line 27 of file endstop.h.

References _default_state, and _pin.

Member Function Documentation

◆ get_state()

bool endstop::get_state ( )
inline

Get the state of end-stop.

Returns
True if end-stop is triggered

Definition at line 47 of file endstop.h.

References _default_state, and _pin.

Referenced by homing(), homing(), and loop().

◆ init()

void endstop::init ( )
inline

Initialize the Input pin for end-stop.

Definition at line 37 of file endstop.h.

References _pin.

Referenced by setup().

Member Data Documentation

◆ _default_state

bool endstop::_default_state
private

Definition at line 56 of file endstop.h.

Referenced by endstop(), and get_state().

◆ _pin

uint8_t endstop::_pin
private

Definition at line 55 of file endstop.h.

Referenced by endstop(), get_state(), and init().


The documentation for this class was generated from the following file: