#include <hall-switch-ino.hpp>
| HallSwitchIno::HallSwitchIno |
( |
uint8_t |
outputPin, |
|
|
HallSwitch::CBack_t |
cBack = NULL, |
|
|
uint8_t |
powerPin = UNUSED_PIN |
|
) |
| |
Hall Switch Ino Constructor.
Mandatory arguments:
- Output pin Optional arguments:
- Interrupt callback. By default NULL. Required to enable interrupt mode
- Power pin. By default not allocated
- Parameters
-
| [in] | outputPin | Sensor output pin |
| [in] | cBack | Callback for interrupt mode. When passed, it enables interrupt mode |
| [in] | powerPin | Sensor switch power controller pin |
- Precondition
- None
Hall Switch Ino Constructor with predefined Arduino hardware platform.
Mandatory arguments:
- Hardware platform Optional arguments:
- Interrupt callback. By default NULL. Required to enable interrupt mode
- Parameters
-
| [in] | hwPlatf | Predefined Arduino hardware platform |
| [in] | cBack | Callback for interrupt mode. When passed, it enables interrupt mode |
- Precondition
- None
| HallSwitchIno::~HallSwitchIno |
( |
| ) |
|
Hall Switch Ino Destructor.
- Precondition
- None
| int HallSwitchIno::begin |
( |
| ) |
|
Begins the switch.
- Precondition
- None
- Return values
-
| int HallSwitchIno::end |
( |
| ) |
|
Ends the switch.
- Precondition
- Instance has called begin()
- Return values
-
| int HallSwitchIno::getBField |
( |
| ) |
|
Gets the switch output value.
- Precondition
- Instance has called begin()
- Return values
-
| 1 | if magnetic field present |
| 0 | if magnetic field not present |
| -1 | if error |
The documentation for this class was generated from the following files: