irgesture2 2.0.0.0
|
API for configuring and manipulating IR Gesture 2 Click driver. More...
Topics | |
IR Gesture 2 Registers List | |
List of registers of IR Gesture 2 Click driver. | |
IR Gesture 2 Registers Settings | |
Settings for registers of IR Gesture 2 Click driver. | |
IR Gesture 2 MikroBUS Map | |
MikroBUS pin mapping of IR Gesture 2 Click driver. | |
Functions | |
void | irgesture2_cfg_setup (irgesture2_cfg_t *cfg) |
IR Gesture 2 configuration object setup function. | |
err_t | irgesture2_init (irgesture2_t *ctx, irgesture2_cfg_t *cfg) |
IR Gesture 2 initialization function. | |
err_t | irgesture2_default_cfg (irgesture2_t *ctx) |
IR Gesture 2 default configuration function. | |
err_t | irgesture2_generic_write (irgesture2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
IR Gesture 2 data writing function. | |
err_t | irgesture2_generic_read (irgesture2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
IR Gesture 2 data reading function. | |
err_t | irgesture2_write_register (irgesture2_t *ctx, uint8_t reg, uint8_t data_in) |
IR Gesture 2 write register function. | |
err_t | irgesture2_read_register (irgesture2_t *ctx, uint8_t reg, uint8_t *data_out) |
IR Gesture 2 read register function. | |
err_t | irgesture2_read_pixels (irgesture2_t *ctx, int16_t *pixels, bool flip_pixels) |
IR Gesture 2 read pixels function. | |
uint8_t | irgesture2_get_int_pin (irgesture2_t *ctx) |
IR Gesture 2 get int pin function. | |
API for configuring and manipulating IR Gesture 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void irgesture2_cfg_setup | ( | irgesture2_cfg_t * | cfg | ) |
IR Gesture 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See irgesture2_cfg_t object definition for detailed explanation. |
err_t irgesture2_default_cfg | ( | irgesture2_t * | ctx | ) |
IR Gesture 2 default configuration function.
This function executes a default configuration of IR Gesture 2 click board.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t irgesture2_generic_read | ( | irgesture2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
IR Gesture 2 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t irgesture2_generic_write | ( | irgesture2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
IR Gesture 2 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t irgesture2_get_int_pin | ( | irgesture2_t * | ctx | ) |
IR Gesture 2 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
err_t irgesture2_init | ( | irgesture2_t * | ctx, |
irgesture2_cfg_t * | cfg ) |
IR Gesture 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See irgesture2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t irgesture2_read_pixels | ( | irgesture2_t * | ctx, |
int16_t * | pixels, | ||
bool | flip_pixels ) |
IR Gesture 2 read pixels function.
This function reads the raw ADC values of entire 60-pixel IR photodiode array.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[out] | pixels | : Array of 60 int16_t elements where to store the pixels values. |
[in] | flip_pixels | : Flip pixels, set to true if the click board is mounted upside-down. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t irgesture2_read_register | ( | irgesture2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
IR Gesture 2 read register function.
This function reads a data byte from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t irgesture2_write_register | ( | irgesture2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
IR Gesture 2 write register function.
This function writes a data byte to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See irgesture2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.