Hall Switch  2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
HallSpeedIno Class Reference

#include <hall-speed-ino.hpp>

Public Member Functions

 HallSpeedIno (uint8_t outputPin, uint8_t polesNum=1, HallSpeed::SpeedUnit_t units=HallSpeed::HERTZ, HallSpeed::CBackSpd_t cBack=NULL, uint8_t powerPin=UNUSED_PIN)
 Hall Speed Ino Constructor. More...
 
 HallSpeedIno (PlatformIno_t hwPlatf, uint8_t polesNum=1, HallSpeed::SpeedUnit_t units=HallSpeed::HERTZ, HallSpeed::CBackSpd_t cBack=NULL)
 Hall Speed Ino Constructor with predefined Arduino hardware platform. More...
 
 ~HallSpeedIno ()
 Hall Speed Ino Destructor. More...
 
int begin ()
 Begins the speed sensor. More...
 
int end ()
 Ends the speed sensor. More...
 
double getSpeed ()
 Gets the speed value. More...
 

Constructor & Destructor Documentation

HallSpeedIno::HallSpeedIno ( uint8_t  outputPin,
uint8_t  polesNum = 1,
HallSpeed::SpeedUnit_t  units = HallSpeed::HERTZ,
HallSpeed::CBackSpd_t  cBack = NULL,
uint8_t  powerPin = UNUSED_PIN 
)

Hall Speed Ino Constructor.

Mandatory arguments:

  • Sensor output pin

Optional arguments:

  • Magnetic poles pair number. By default 1 pair
  • Speed units. By default Hertzs
  • Interrupt callback. By default NULL. Required to enable interrupt mode
  • Sensor power pin (only for switch powered mode platform). By default it is UNUSED
Parameters
[in]outputPinSensor output pin
[in]polesMumNumber of magnetic poles pair of the rotating B field
[in]unitsSpeed units (RPM, Hertz, cps ...)
[in]cBackCallback for interrupt mode. When passed, it enables interrupt mode
[in]powerPinHall speed power pin. When passed, enabled the sensor switch controlled mode
Precondition
None
HallSpeedIno::HallSpeedIno ( PlatformIno_t  hwPlatf,
uint8_t  polesNum = 1,
HallSpeed::SpeedUnit_t  units = HallSpeed::HERTZ,
HallSpeed::CBackSpd_t  cBack = NULL 
)

Hall Speed Ino Constructor with predefined Arduino hardware platform.

Mandatory arguments:

  • Hardware platform

Optional arguments:

  • Magnetic poles pair number. By default 1 pair
  • Speed units. By default Hertzs
  • Interrupt callback. By default NULL. Required to enable interrupt mode
Parameters
[in]hwPlatfPredefined Arduino hardware platform
[in]polesMumNumber of magnetic poles pair of the rotating B field
[in]unitsSpeed units (RPM, Hertz, cps ...)
[in]cBackCallback for interrupt mode. When passed, it enables interrupt mode
Precondition
None
HallSpeedIno::~HallSpeedIno ( )

Hall Speed Ino Destructor.

Precondition
None

Here is the call graph for this function:

Member Function Documentation

int HallSpeedIno::begin ( )

Begins the speed sensor.

Precondition
None
Return values
0if OK
-1if error

Here is the call graph for this function:

int HallSpeedIno::end ( )

Ends the speed sensor.

Precondition
Instance has called begin()
Return values
0if OK
-1if error

Here is the call graph for this function:

double HallSpeedIno::getSpeed ( )

Gets the speed value.

Precondition
Instance has called begin()
Returns
Speed in the configured units
Return values
-1if error

Here is the call graph for this function:


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