Hall Switch 2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
 
Loading...
Searching...
No Matches
HallSwitchIno Class Reference

#include <hall-switch-ino.hpp>

Public Member Functions

 HallSwitchIno (uint8_t outputPin, HallSwitch::CBack_t cBack=NULL, uint8_t powerPin=UNUSED_PIN)
 Hall Switch Ino Constructor.
 
 HallSwitchIno (PlatformIno_t hwPlatf, HallSwitch::CBack_t cBack=NULL)
 Hall Switch Ino Constructor with predefined Arduino hardware platform.
 
 ~HallSwitchIno ()
 Hall Switch Ino Destructor

 
int begin ()
 Begins the switch.
 
int end ()
 Ends the switch.
 
int getBField ()
 Gets the switch output value.
 

Constructor & Destructor Documentation

◆ HallSwitchIno() [1/2]

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]outputPinSensor output pin
[in]cBackCallback for interrupt mode. When passed, it enables interrupt mode
[in]powerPinSensor switch power controller pin
Precondition
None

◆ HallSwitchIno() [2/2]

HallSwitchIno::HallSwitchIno ( PlatformIno_t  hwPlatf,
HallSwitch::CBack_t  cBack = NULL 
)

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]hwPlatfPredefined Arduino hardware platform
[in]cBackCallback for interrupt mode. When passed, it enables interrupt mode
Precondition
None

◆ ~HallSwitchIno()

HallSwitchIno::~HallSwitchIno ( )

Hall Switch Ino Destructor

Precondition
None
Here is the call graph for this function:

Member Function Documentation

◆ begin()

int HallSwitchIno::begin ( )

Begins the switch.

Precondition
None
Return values
0if OK
-1if error
Here is the call graph for this function:

◆ end()

int HallSwitchIno::end ( )

Ends the switch.

Precondition
Instance has called begin()
Return values
0if OK
-1if error
Here is the call graph for this function:

◆ getBField()

int HallSwitchIno::getBField ( )

Gets the switch output value.

Precondition
Instance has called begin()
Return values
1if magnetic field present
0if magnetic field not present
-1if error
Here is the call graph for this function:

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