28 #include <mraa/gpio.hpp> 58 KX122(
int bus,
int addr,
int chip_select,
int spi_bus_frequency = DEFAULT_SPI_FREQUENCY);
77 void deviceInit(KX122_ODR_T odr, KX122_RES_T res, KX122_RANGE_T grange);
187 void setODR(KX122_ODR_T odr);
220 void setBW(LPRO_STATE_T lpro);
242 void installISR(mraa::Edge edge, KX122_INTERRUPT_PIN_T intp,
int pin,
void (*isr)(
void*),
void *arg);
430 void bufferInit(uint samples, KX122_RES_T res, KX122_BUFFER_MODE_T mode);
std::vector< float > getAccelerationDataVector()
Definition: kx122.cxx:84
void enableInterrupt1(KX122_INTERRUPT_POLARITY_T polarity)
Definition: kx122.cxx:181
bool getInterruptStatus()
Definition: kx122.cxx:223
void disableInterrupt2()
Definition: kx122.cxx:202
void setBufferMode(KX122_BUFFER_MODE_T mode)
Definition: kx122.cxx:308
void disableBufferFullInterrupt()
Definition: kx122.cxx:266
void setODR(KX122_ODR_T odr)
Definition: kx122.cxx:134
void selfTest()
Definition: kx122.cxx:113
void disableInterrupt1()
Definition: kx122.cxx:195
void bufferInit(uint samples, KX122_RES_T res, KX122_BUFFER_MODE_T mode)
Definition: kx122.cxx:287
void routeInterrupt1(uint8_t bits)
Definition: kx122.cxx:209
void setResolution(KX122_RES_T res)
Definition: kx122.cxx:148
float getSamplePeriod()
Definition: kx122.cxx:55
void installISR(mraa::Edge edge, KX122_INTERRUPT_PIN_T intp, int pin, void(*isr)(void *), void *arg)
Definition: kx122.cxx:169
void enableIIR()
Definition: kx122.cxx:99
void uninstallISR(KX122_INTERRUPT_PIN_T intp)
Definition: kx122.cxx:176
void setBufferThreshold(uint samples)
Definition: kx122.cxx:301
void getAccelerationData(float *x, float *y, float *z)
Definition: kx122.cxx:77
void setBufferResolution(KX122_RES_T res)
Definition: kx122.cxx:294
uint getBufferStatus()
Definition: kx122.cxx:315
uint8_t getWhoAmI()
Definition: kx122.cxx:60
void setBW(LPRO_STATE_T lpro)
Definition: kx122.cxx:155
std::vector< float > getBufferSamples(uint len)
Definition: kx122.cxx:346
~KX122()
Definition: kx122.cxx:43
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
void disableDataReadyInterrupt()
Definition: kx122.cxx:252
void clearInterrupt()
Definition: kx122.cxx:238
void setSensorStandby()
Definition: kx122.cxx:120
std::vector< float > getRawBufferSamples(uint len)
Definition: kx122.cxx:328
void setSensorActive()
Definition: kx122.cxx:127
void disableIIR()
Definition: kx122.cxx:106
void softwareReset()
Definition: kx122.cxx:92
void setGrange(KX122_RANGE_T grange)
Definition: kx122.cxx:141
void enableInterrupt2(KX122_INTERRUPT_POLARITY_T polarity)
Definition: kx122.cxx:188
void getRawAccelerationData(float *x, float *y, float *z)
Definition: kx122.cxx:70
void deviceInit(KX122_ODR_T odr, KX122_RES_T res, KX122_RANGE_T grange)
Definition: kx122.cxx:48
void disableBuffer()
Definition: kx122.cxx:280
void enableBuffer()
Definition: kx122.cxx:273
void enableDataReadyInterrupt()
Definition: kx122.cxx:245
void setAverage(KX122_AVG_T avg)
Definition: kx122.cxx:162
uint8_t getInterruptSource()
Definition: kx122.cxx:228
C API for the kx122 driver.
KX122(int bus, int addr, int chip_select, int spi_bus_frequency=DEFAULT_SPI_FREQUENCY)
Definition: kx122.cxx:35
void clearBuffer()
Definition: kx122.cxx:364
void routeInterrupt2(uint8_t bits)
Definition: kx122.cxx:216
void enableBufferFullInterrupt()
Definition: kx122.cxx:259