Hall Switch 2.1.0
C++ library of Infineon single Hall-effect switch family for magnetic sensing applications
 
Loading...
Searching...
No Matches
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.
 
 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.
 
 ~HallSpeedIno ()
 Hall Speed Ino Destructor

 
int begin ()
 Begins the speed sensor.
 
int end ()
 Ends the speed sensor.
 
double getSpeed ()
 Gets the speed value.
 

Constructor & Destructor Documentation

◆ HallSpeedIno() [1/2]

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() [2/2]

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

Hall Speed Ino Destructor

Precondition
None
Here is the call graph for this function:

Member Function Documentation

◆ begin()

int HallSpeedIno::begin ( )

Begins the speed sensor.

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

◆ end()

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:

◆ getSpeed()

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: