Hall Switch Interrupt Raspberry Pi Example. More...
Functions | |
void | IntCBack (HallSwitch::Result_t result) |
int | main () |
Variables | |
HallSwitchRpi | hs (TLE4964_3M_S2Go_Rpi_Adapter_Slot_1, IntCBack) |
Hall Switch Interrupt Raspberry Pi Example.
SPDX-License-Identifier: MIT
void IntCBack | ( | HallSwitch::Result_t | result | ) |
Raspberry Pi Example
Use interrupt to trigger on change of Bfield.
Note: Don't forget to define HALL_SWITCH_FRAMEWORK as HALL_SWITCH_FRMWK_RPI in src/config/hall-conf.hpp.Callback function for the interrupt
int main | ( | ) |
Create Hall Switch Object
Frameworks: TLE4964_3M_S2Go_Rpi_Adapter_Slot_1 TLE4964_3M Shield2Go on Slot 1 of Infineon's Shield2Go Adapter on a Raspberry Pi >= 2. TLE4964_3M_S2Go_Rpi_Adapter_Slot_2 TLE4964_3M Shield2Go on Slot 2 of Infineon's Shield2Go Adapter on a Raspberry Pi >= 2. TLE4964_3M_S2Go_Rpi_Adapter_Slot_3 TLE4964_3M Shield2Go on Slot 3 of Infineon's Shield2Go Adapter on a Raspberry Pi >= 2.