| 
    upm
    0.6.2
    
   Sensor/Actuator repository for libmraa (v0.10.1) 
   | 
 
KXCJK1013 Tri-axis Digital Accelerometer API. More...
The KXCJK is a tri-axis +/-2g, +/-4g or +/-8g silicon micromachined accelerometer.
Public Member Functions | |
| KXCJK1013 (int device) | |
| ~KXCJK1013 () | |
| void | installISR (void(*isr)(char *), void *arg) | 
| int64_t | getChannelValue (unsigned char *input, mraa_iio_channel *chan) | 
| bool | enableBuffer (int length) | 
| bool | disableBuffer () | 
| bool | setScale (const float scale) | 
| bool | setSamplingFrequency (const float sampling_frequency) | 
| bool | enable3AxisChannel () | 
| void | extract3Axis (char *data, float *x, float *y, float *z) | 
| void installISR | ( | void(*)(char *) | isr, | 
| void * | arg | ||
| ) | 
Installs an interrupt service routine (ISR) to be called when an interrupt occurs
| interrupt | channel | 
| fptr | Pointer to a function to be called on interrupt | 
| arg | Pointer to an object to be supplied as an argument to the ISR. | 
| int64_t getChannelValue | ( | unsigned char * | input, | 
| mraa_iio_channel * | chan | ||
| ) | 
Extract the channel value based on channel type
| input | Channel data | 
| chan | MRAA iio-layer channel info | 

| bool enableBuffer | ( | int | length | ) | 
Enable trigger buffer
| trigger | buffer length in string | 
| bool disableBuffer | ( | ) | 
Disable trigger buffer
| bool setScale | ( | const float | scale | ) | 
Set scale
| scale | in string | 
| bool setSamplingFrequency | ( | const float | sampling_frequency | ) | 
Set sampling frequency
| sampling | frequency in string | 
| bool enable3AxisChannel | ( | ) | 
Enable 3 axis scan element
| void extract3Axis | ( | char * | data, | 
| float * | x, | ||
| float * | y, | ||
| float * | z | ||
| ) | 
Process enabled channel buffer and return x, y, z axis
| data | Enabled channel data, 6 bytes, each axis 2 bytes | 
| x | X-Axis | 
| y | Y-Axis | 
| z | Z-Axis | 

 1.8.6