Hall Switch  2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
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. More...
 
 HallSwitchIno (PlatformIno_t hwPlatf, HallSwitch::CBack_t cBack=NULL)
 Hall Switch Ino Constructor with predefined Arduino hardware platform. More...
 
 ~HallSwitchIno ()
 Hall Switch Ino Destructor. More...
 
int begin ()
 Begins the switch. More...
 
int end ()
 Ends the switch. More...
 
int getBField ()
 Gets the switch output value. More...
 

Constructor & Destructor Documentation

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::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 ( )

Hall Switch Ino Destructor.

Precondition
None

Here is the call graph for this function:

Member Function Documentation

int HallSwitchIno::begin ( )

Begins the switch.

Precondition
None
Return values
0if OK
-1if error

Here is the call graph for this function:

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:

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: