upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
API for the A110X Hall Effect sensors. More...
UPM module for the A110X (A1101, A1102, A1103, A1104, and A1106) Hall Effect sensors. It outputs a digital signal indicating whether it is detecting a magnetic field with south polarity perpendicular to the sensor element.
An example showing a simple test for the presence of a field
An example demonstrating the use of an interrupt handler to count pulses
Public Member Functions | |
A110X (int pin) | |
~A110X () | |
bool | magnetDetected () |
void | installISR (void(*isr)(void *), void *arg) |
void | uninstallISR () |
A110X | ( | int | pin | ) |
A110x digital sensor constructor
pin | Digital pin to use |
bool magnetDetected | ( | ) |
Determines whether a magnetic field of south polarity has been detected
void installISR | ( | void(*)(void *) | isr, |
void * | arg | ||
) |
Installs an interrupt service routine (ISR) to be called when the appropriate magnetic field is detected
fptr | Pointer to a function to be called on interrupt |
arg | Pointer to an object to be supplied as an argument to the ISR. |
void uninstallISR | ( | ) |
Uninstalls the previously installed ISR