Functions | |
TLx4966::TLx4966 (uint8_t polesPair, TLx4966_SpeedUnit_t speedUnit=TLx4966_SPEED_RPM, ArduinoHwPlatf ardHwPlatf=Shield_2Go, TLx4966_MeasMode_t measMode=TLx4966_MEASMODE_POLLING) | |
Double hall switch instance constructor Mandatory hw interfaces: dir, speed, timer. Optional hw interfaces: power (only for switch mode platform). More... | |
TLx4966::TLx4966 (uint8_t polesPair, TLx4966_PowerMode_t powMode, TLx4966_MeasMode_t measMode, TLx4966_SpeedUnit_t speedUnit, TLx4966_HwIntf_t *hwIntf) | |
Double hall switch instance constructor Mandatory hw interfaces: dir, speed, timer. Optional hw interfaces: power (only for switch mode platform). More... | |
TLx4966_Error_t | TLx4966::begin () |
Initilializes the hardware interfaces. More... | |
TLx4966::~TLx4966 () | |
Double hall switch instance destructor. More... | |
TLx4966_Error_t | TLx4966::enable () |
Enables the sensor. More... | |
TLx4966_Error_t | TLx4966::disable () |
Disables the sensor. More... | |
void | TLx4966::measureLoop () |
Updates the rotation direction and speed. More... | |
TLx4966_Status_t | TLx4966::readStatus () |
Reads the sensor status. More... | |
TLx4966_Dir_t | TLx4966::readDirection () |
Gets the rotation direction The direction definition (clock-wise/anticlock-wise, left/rigth, positive/negative...) is dependant of the mechanical configuration of the sensor with repect to the rotor. The library just provide voltage-low/voltage-high directions. More... | |
double | TLx4966::readSpeed () |
Gets the rotation speed. More... | |
TLx4966_Error_t TLx4966::begin | ( | void | ) |
Initilializes the hardware interfaces.
TLx4966_OK | if success |
TLx4966_INTF_ERROR | if hardware interface error |
TLx4966_Error_t TLx4966::disable | ( | ) |
Disables the sensor.
TLx4966_OK | if success |
TLx4966_INTF_ERROR | if hardware interface error |
TLx4966_Error_t TLx4966::enable | ( | void | ) |
Enables the sensor.
TLx4966_OK | if success |
TLx4966_INTF_ERROR | if hardware interface error |
void TLx4966::measureLoop | ( | ) |
Updates the rotation direction and speed.
TLx4966_Dir_t TLx4966::readDirection | ( | ) |
Gets the rotation direction The direction definition (clock-wise/anticlock-wise, left/rigth, positive/negative...) is dependant of the mechanical configuration of the sensor with repect to the rotor. The library just provide voltage-low/voltage-high directions.
TLx4966_DIR_UNDEF | prior initial rotor movement (after initialization) |
double TLx4966::readSpeed | ( | ) |
Gets the rotation speed.
TLx4966_Status_t TLx4966::readStatus | ( | ) |
Reads the sensor status.
TLx4966::TLx4966 | ( | uint8_t | polesPair, |
TLx4966_SpeedUnit_t | speedUnit = TLx4966_SPEED_RPM , |
||
ArduinoHwPlatf | ardHwPlatf = Shield_2Go , |
||
TLx4966_MeasMode_t | measMode = TLx4966_MEASMODE_POLLING |
||
) |
Double hall switch instance constructor Mandatory hw interfaces: dir, speed, timer. Optional hw interfaces: power (only for switch mode platform).
[in] | polesPair | Rotor poles pair number |
[in] | speedUnit | Speed unit |
[in] | ardHwPlatf | Arduino hardware platform |
[in] | measMode | Measuring mode |
TLx4966::TLx4966 | ( | uint8_t | polesPair, |
TLx4966_PowerMode_t | powMode, | ||
TLx4966_MeasMode_t | measMode, | ||
TLx4966_SpeedUnit_t | speedUnit, | ||
TLx4966_HwIntf_t * | hwIntf | ||
) |
Double hall switch instance constructor Mandatory hw interfaces: dir, speed, timer. Optional hw interfaces: power (only for switch mode platform).
[in] | polesPair | Rotor poles pair number |
[in] | powMode | Power mode |
[in] | measMode | Measuring mode |
[in] | speedUnit | Speed unit |
[in] | *hwIntf | Pointer to hardware interface handle |
TLx4966::~TLx4966 | ( | void | ) |
Double hall switch instance destructor.
Disables the switch