irsense 2.0.0.0
Public function

Functions

void irsense_cfg_setup (irsense_cfg_t *cfg)
 Config Object Initialization function.
 
IRSENSE_RETVAL irsense_init (irsense_t *ctx, irsense_cfg_t *cfg)
 Initialization function.
 
void irsense_generic_write (irsense_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void irsense_generic_read (irsense_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void irsense_write_byte (irsense_t *ctx, uint8_t reg_address, uint8_t write_data)
 Generic write the byte of data function.
 
uint8_t irsense_read_byte (irsense_t *ctx, uint8_t reg_address)
 Generic read the byte of data function.
 
uint16_t irsense_read_data (irsense_t *ctx, uint8_t reg_address_low)
 Generic read 16-bit of data function.
 
void irsense_power_on (irsense_t *ctx)
 Enable the sensor function.
 
void irsense_power_off (irsense_t *ctx)
 Disable the sensor function.
 
uint8_t irsense_get_company_code (irsense_t *ctx)
 Get company code function.
 
uint8_t irsense_get_device_id (irsense_t *ctx)
 Get device ID function.
 
uint8_t irsense_read_interrupt_status (irsense_t *ctx)
 Get interrupts activate or inactivate corresponding status value function.
 
uint8_t irsense_get_status (irsense_t *ctx)
 Get status value function.
 
void irsense_set_configuration (irsense_t *ctx, uint8_t register_value)
 Set configuration function.
 
void irsense_set_mode (irsense_t *ctx, uint8_t mode)
 Set the mode function.
 
void irsense_set_cutoff_frequency (irsense_t *ctx, uint8_t frequency)
 Set the cutoff frequency function.
 
uint8_t irsense_check_available (irsense_t *ctx)
 Checks to see if DRDY flag is set in the status register function.
 
uint8_t irsense_check_overrun (irsense_t *ctx)
 Checks to see if data overrun flag is set in the status register function.
 
void irsense_soft_reset (irsense_t *ctx)
 Soft reset function.
 
void irsense_refresh (irsense_t *ctx)
 Refresh by read dummy data function.
 
int16_t irsense_get_ir1 (irsense_t *ctx)
 Get value of sensor channel 1 function.
 
int16_t irsense_get_ir2 (irsense_t *ctx)
 Get value of sensor channel 2 function.
 
int16_t irsense_get_ir3 (irsense_t *ctx)
 Get value of sensor channel 3 function.
 
int16_t irsense_get_ir4 (irsense_t *ctx)
 Get value of sensor channel 4 function.
 
void irsense_get_ir_sense (irsense_t *ctx, irsense_ir_data_t *ir_data)
 Get value of sensor all channels function.
 
float irsense_get_temperature (irsense_t *ctx)
 Get the temperature in degrees Celsius function.
 
float irsense_get_temperature_f (irsense_t *ctx)
 Get the temperature in Fahrenheit degrees function.
 
void irsense_set_threshold_ir2_ir4 (irsense_t *ctx, uint8_t value)
 Set high or low threshold for channel 2 and channel 4 ( Ir2-Ir4 ) function.
 
uint16_t irsense_get_threshold_ir2_ir4 (irsense_t *ctx)
 Get threshold value for channel 2 and channel 4 ( Ir2-Ir4 ) function.
 
void irsense_set_threshold_eeprom_ir2_ir4 (irsense_t *ctx, uint8_t value)
 Set high or low EEPROM threshold for channel 2 and channel 4 ( Ir2-Ir4 ) function.
 
void irsense_set_threshold_ir1_ir3 (irsense_t *ctx, uint8_t value)
 Set high or low threshold for channel 1 and channel 3 ( Ir1-Ir3 ) function.
 
uint16_t irsense_get_threshold_ir1_ir3 (irsense_t *ctx)
 Get threshold value for channel 1 and channel 3 ( Ir1-Ir3 ) function.
 
void irsense_set_threshold_eeprom_ir1_ir3 (irsense_t *ctx, uint8_t value)
 Set high or low EEPROM threshold for channel 1 and channel 3 ( Ir1-Ir3 ) function.
 
void irsense_read_threshold (irsense_t *ctx, irsense_reg_t *reg)
 Get threshold value for all channels function.
 
void irsense_read_threshold_eeprom (irsense_t *ctx, irsense_eeprom_t *eeprom)
 Get threshold EEPROM value for all channels function.
 
void irsense_set_hysteresis_ir2_ir4 (irsense_t *ctx, uint8_t value)
 Set hysteresis setting of threshold level for channel 2 and channel 4 ( Ir2-Ir4 ) function.
 
void irsense_set_hysteresis_eeprom_ir2_ir4 (irsense_t *ctx, uint8_t value)
 Set hysteresis EEPROM setting of threshold level for channel 2 and channel 4 ( Ir2-Ir4 ) function.
 
void irsense_set_hysteresis_ir1_ir3 (irsense_t *ctx, uint8_t value)
 Set hysteresis setting of threshold level for channel 1 and channel 3 ( Ir1-Ir3 ) function.
 
void irsense_set_hysteresis_eeprom_ir1_ir3 (irsense_t *ctx, uint8_t value)
 Set hysteresis EEPROM setting of threshold level for channel 1 and channel 3 ( Ir1-Ir3 ) function.
 
void irsense_read_hysteresis (irsense_t *ctx, uint8_t *ehys24, uint8_t *ehys13)
 Get Hysteresis value for all channes function.
 
void irsense_read_hysteresis_eeprom (irsense_t *ctx, uint8_t *eehys24, uint8_t *eehys13)
 Get Hysteresis EEPROM value for all channes function.
 
void irsense_set_interrupts_reg (irsense_t *ctx, irsense_eint_t *eint)
 Sets interrupts activate or inactivate corresponding function.
 
void irsense_enable_data_ready_interrupt (irsense_t *ctx)
 Sets interrupts source settings function.
 
uint8_t irsense_check_int_states (irsense_t *ctx)
 Check state of INT pin function.
 

Detailed Description

Function Documentation

◆ irsense_cfg_setup()

void irsense_cfg_setup ( irsense_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ irsense_check_available()

uint8_t irsense_check_available ( irsense_t * ctx)

Checks to see if DRDY flag is set in the status register function.

Parameters
ctxClick object.
Returns
Data Ready:
  • 0 : Normal State.
  • 1 : Data Ready.

@description Function checks to see if DRDY flag is set in the status register by read DRDY bit from the target IRSENSE_REG_ST1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_check_int_states()

uint8_t irsense_check_int_states ( irsense_t * ctx)

Check state of INT pin function.

Parameters
ctxClick object.
Returns
state of INT pin :
  • 0 : Interrupt Disable.
  • 1 : Interrupt Enable.

@description Function check state of INT pin of AK9750 sensor on IR Sense click board.

◆ irsense_check_overrun()

uint8_t irsense_check_overrun ( irsense_t * ctx)

Checks to see if data overrun flag is set in the status register function.

Parameters
ctxClick object.
Returns
Data Overrun:
  • 0 : Normal State.
  • 1 : Data Overrun.

@description Function checks to see if overrun flag is set in the status register by read overrun bit from the target IRSENSE_REG_ST1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_enable_data_ready_interrupt()

void irsense_enable_data_ready_interrupt ( irsense_t * ctx)

Sets interrupts source settings function.

Parameters
ctxClick object.

@description Function sets interrupts activate or inactivate corresponding by write activate data ready interrupt setting bit to the target IRSENSE_REG_EINTEN of AK9750 sensor on IR Sense click board.

◆ irsense_generic_read()

void irsense_generic_read ( irsense_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf.
lenNumber of the bytes to be read.

@description This function reads data from the desired register.

◆ irsense_generic_write()

void irsense_generic_write ( irsense_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ irsense_get_company_code()

uint8_t irsense_get_company_code ( irsense_t * ctx)

Get company code function.

Parameters
ctxClick object.

@description Function get company code by read 8-bit data from the target _IRSENSE_REG_WIA1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_device_id()

uint8_t irsense_get_device_id ( irsense_t * ctx)

Get device ID function.

Parameters
ctxClick object.

@description Function get device ID by read 8-bit data from the target IRSENSE_REG_WIA2 register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_ir1()

int16_t irsense_get_ir1 ( irsense_t * ctx)

Get value of sensor channel 1 function.

Parameters
ctxClick object.
Returns
16- bit signed channel 1 value

@description Function get value of sensor channel 1 by read value from the two target IRSENSE_REG_IR1_LOW and IRSENSE_REG_IR1_HIGH register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_ir2()

int16_t irsense_get_ir2 ( irsense_t * ctx)

Get value of sensor channel 2 function.

Parameters
ctxClick object.
Returns
16- bit signed channel 2 value

@description Function get value of sensor channel 2 by read value from the two target IRSENSE_REG_IR2_LOW and IRSENSE_REG_IR2_HIGH register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_ir3()

int16_t irsense_get_ir3 ( irsense_t * ctx)

Get value of sensor channel 3 function.

Parameters
ctxClick object.
Returns
16- bit signed channel 3 value

@description Function get value of sensor channel 3 by read value from the two target IRSENSE_REG_IR3_LOW and IRSENSE_REG_IR3_HIGH register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_ir4()

int16_t irsense_get_ir4 ( irsense_t * ctx)

Get value of sensor channel 4 function.

Parameters
ctxClick object.
Returns
16- bit signed channel 4 value

@description Function get value of sensor channel 4 by read value from the two target IRSENSE_REG_IR4_LOW and IRSENSE_REG_IR4_HIGH register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_ir_sense()

void irsense_get_ir_sense ( irsense_t * ctx,
irsense_ir_data_t * ir_data )

Get value of sensor all channels function.

Parameters
ctxClick object.
ir_dataIR data (1,2,3,4).

@description Function get value of sensor all channels by read values from the target IRSENSE_REG_IR1_LOW, IRSENSE_REG_IR1_HIGH, IRSENSE_REG_IR1_LOW, IRSENSE_REG_IR1_HIGH, IRSENSE_REG_IR2_LOW, IRSENSE_REG_IR2_HIGH, IRSENSE_REG_IR3_LOW, IRSENSE_REG_IR3_HIGH, IRSENSE_REG_IR4_LOW and IRSENSE_REG_IR4_HIGH register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_status()

uint8_t irsense_get_status ( irsense_t * ctx)

Get status value function.

Parameters
ctxClick object.
Returns
8-bit status value:
  • [ bit7 : bit2 ] Reserved;
  • [ bit1 ] Data Overrun :
    • 0 : Normal State.
    • 1 : Data Overrun.
  • [ bit0 ] Data Ready :
    • 0 : Normal State.
    • 1 : Data Ready.

@description Function get status value by read 8-bit data from the target IRSENSE_REG_ST1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_get_temperature()

float irsense_get_temperature ( irsense_t * ctx)

Get the temperature in degrees Celsius function.

Parameters
ctxClick object.
Returns
float temperature value in degrees Celsius [ �C ]

@description Function get the temperature float value by read the measurement data from the two target IRSENSE_REG_TMP_LOW and IRSENSE_REG_TMP_HIGH register address of AK9750 sensor on IR Sense click board calculate temperature value to degree Celsius [ �C ].

◆ irsense_get_temperature_f()

float irsense_get_temperature_f ( irsense_t * ctx)

Get the temperature in Fahrenheit degrees function.

Parameters
ctxClick object.
Returns
float temperature value in Fahrenheit degrees [ �F ]

@description Function get the temperature float value by read the measurement data from the two target IRSENSE_REG_TMP_LOW and IRSENSE_REG_TMP_HIGH register address of AK9750 sensor on IR Sense click board calculate temperature value to Fahrenheit degrees [ �F ].

◆ irsense_get_threshold_ir1_ir3()

uint16_t irsense_get_threshold_ir1_ir3 ( irsense_t * ctx)

Get threshold value for channel 1 and channel 3 ( Ir1-Ir3 ) function.

Parameters
ctxClick object.
Returns
16-bit threshold value for channel 1 and channel 3

@description Function get threshold level setting value for channel 1 and channel 3 ( Ir1-Ir3 ) by read 16-bit value to the two target _IRSENSE_REG_ETH13H_LOW and _IRSENSE_REG_ETH13H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_get_threshold_ir2_ir4()

uint16_t irsense_get_threshold_ir2_ir4 ( irsense_t * ctx)

Get threshold value for channel 2 and channel 4 ( Ir2-Ir4 ) function.

Parameters
ctxClick object.
Returns
16-bit threshold value for channel 2 and channel 4

@description Function get threshold level setting value for channel 2 and channel 4 ( Ir2-Ir4 ) by read 16-bit value to the two target IRSENSE_REG_ETH24H_LOW and IRSENSE_REG_ETH24H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_init()

IRSENSE_RETVAL irsense_init ( irsense_t * ctx,
irsense_cfg_t * cfg )

Initialization function.

Parameters
irsenseClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ irsense_power_off()

void irsense_power_off ( irsense_t * ctx)

Disable the sensor function.

Parameters
ctxClick object.

@description Function disable the sensor by clear state of CS pin of AK9750 sensor on IR Sense click board.

◆ irsense_power_on()

void irsense_power_on ( irsense_t * ctx)

Enable the sensor function.

Parameters
ctxClick object.

@description Function enable the sensor by set state of CS pin of AK9750 sensor on IR Sense click board.

◆ irsense_read_byte()

uint8_t irsense_read_byte ( irsense_t * ctx,
uint8_t reg_address )

Generic read the byte of data function.

Parameters
ctxClick object.
reg_addressRegister address.

@description Function read the 8-bit data from the target 8-bit register address of AK9750 sensor on IR Sense click board.

◆ irsense_read_data()

uint16_t irsense_read_data ( irsense_t * ctx,
uint8_t reg_address_low )

Generic read 16-bit of data function.

Parameters
ctxClick object.
reg_address_lowLow register address.

@description Function read the 16-bit data from the two target 8-bit register address of AK9750 sensor on IR Sense click board.

◆ irsense_read_hysteresis()

void irsense_read_hysteresis ( irsense_t * ctx,
uint8_t * ehys24,
uint8_t * ehys13 )

Get Hysteresis value for all channes function.

Parameters
ctxClick object.
ehys24pointer to 8-bit ( Ir2-Ir4 ) hysteresis setting of threshold level value.
ehys13pointer to 8-bit ( Ir1-Ir3 ) hysteresis setting of threshold level value.

@description Function get hysteresis setting of threshold level value for all channels by read all hysteresis setting of threshold level value from all target registers of AK9750 sensor on IR Sense click board.

◆ irsense_read_hysteresis_eeprom()

void irsense_read_hysteresis_eeprom ( irsense_t * ctx,
uint8_t * eehys24,
uint8_t * eehys13 )

Get Hysteresis EEPROM value for all channes function.

Parameters
ctxClick object.
eehys24pointer to 8-bit ( Ir2-Ir4 ) hysteresis EEPROM setting of threshold level value.
eehys13pointer to 8-bit ( Ir1-Ir3 ) hysteresis EEPROM setting of threshold level value.

@description Function get hysteresis EEPROM setting of threshold level value for all channels by read all hysteresis EEPROM setting of threshold level value from all target registers of AK9750 sensor on IR Sense click board.

◆ irsense_read_interrupt_status()

uint8_t irsense_read_interrupt_status ( irsense_t * ctx)

Get interrupts activate or inactivate corresponding status value function.

Parameters
ctxClick object.
Returns
8-bit interrupts status value:
  • [ bit7 : bit5 ] Reserved;
  • [ bit4 ] The differential signals of two IR sensors (IR1 - IR3 ) are equal to or above the upper threshold levels :
    • 0 : The differential signals ( IR1 � IR3 ) are below the upper threshold levels.
    • 1 : The differential signals ( IR1 � IR3 ) are below the upper threshold levels.
  • [ bit3 ] The differential signals of two IR sensors ( IR1 - IR3 ) are equal to or below the lower threshold levels :
    • 0 : The differential signals ( IR1 - IR3 ) are above the lower threshold levels.
    • 1 : The differential signals ( IR1 - IR3 ) are equal to or below the lower threshold levels.
  • [ bit2 ] The differential signals of two IR sensors (IR2 - IR4 ) are equal to or above the upper threshold levels :
    • 0 : The differential signals ( IR2 � IR4 ) are below the upper threshold levels.
    • 1 : The differential signals ( IR2 � IR4 ) are below the upper threshold levels.
  • [ bit1 ] The differential signals of two IR sensors ( IR2 - IR4 ) are equal to or below the lower threshold levels :
    • 0 : The differential signals ( IR2 - IR4 ) are above the lower threshold levels.
    • 1 : The differential signals ( IR2 - IR4 ) are equal to or below the lower threshold levels.
  • [ bit0 ] Data Ready :
    • 0 : Normal state.
    • 1 : Data Ready.

@description Function get interrupts activate or inactivate corresponding status by read 8-bit data from the target _IRSENSE_REG_INTST register address of AK9750 sensor on IR Sense click board.

◆ irsense_read_threshold()

void irsense_read_threshold ( irsense_t * ctx,
irsense_reg_t * reg )

Get threshold value for all channels function.

Parameters
ctxClick object.
regRegister address.

@description Function get threshold level setting value for all channels by read all threshold level setting value from all target registers of AK9750 sensor on IR Sense click board.

◆ irsense_read_threshold_eeprom()

void irsense_read_threshold_eeprom ( irsense_t * ctx,
irsense_eeprom_t * eeprom )

Get threshold EEPROM value for all channels function.

Parameters
ctxClick object.
eeth24hpointer to 16-bit ( High Ir2-Ir4 ) EEPROM value.
eeth24lpointer to 16-bit ( Low Ir2-Ir4 ) EEPROM value.
eeth13hpointer to 16-bit ( High Ir1-Ir3 ) EEPROM value.
eeth13lpointer to 16-bit ( Low Ir1-Ir3 ) EEPROM value.

@description Function get threshold EEPROM level setting value for all channels by read all threshold EEPROM level setting value from all target registers of AK9750 sensor on IR Sense click board.

◆ irsense_refresh()

void irsense_refresh ( irsense_t * ctx)

Refresh by read dummy data function.

Parameters
ctxClick object.

@description Function refresh by read dummy data by read data from the target IRSENSE_REG_ST2 register address of AK9750 sensor on IR Sense click board.

◆ irsense_set_configuration()

void irsense_set_configuration ( irsense_t * ctx,
uint8_t register_value )

Set configuration function.

Parameters
ctxClick object.
registerValue8-bit interrupts status value:
  • [ bit7 ] Reserved;
  • [ bit6 ] Setting :
    • 0 : Normal Mode.
    • 1 : EEPROM Access Mode.
  • [ bit5 : bit3 ] Digital Filter Cutoff Frequency (Fc) setting :
    • 0 : Frequency 0.3 Hz.
    • 1 : Frequency 0.6 Hz.
    • 2 : Frequency 1.1 Hz.
    • 3 : Frequency 2.2 Hz.
    • 4 : Frequency 4.4 Hz.
    • 5 : Frequency 8.8 Hz.
    • 6 : Be prohibited.
    • 7 : Be prohibited.
  • [ bit2 : bit0 ] Mode setting :
    • 0 : Stand-by Mode.
    • 1 : EEPROM Access Mode.
    • 2 : Shingle Shot Mode.
    • 3 : Be prohibited.
    • 4 : Continuous Mode 0.
    • 5 : Continuous Mode 1.
    • 6 : Continuous Mode 2.
    • 7 : Continuous Mode 3.

@description Function set configuration by write 8-bit registerValue to the target IRSENSE_REG_ECNTL1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_set_cutoff_frequency()

void irsense_set_cutoff_frequency ( irsense_t * ctx,
uint8_t frequency )

Set the cutoff frequency function.

Parameters
ctxClick object.
frequency8-bit mode value [ bit5 : bit3 ] :
  • 0x00 : Frequency 0.3 Hz.
  • 0x08 : Frequency 0.6 Hze.
  • 0x10 : Frequency 1.1 Hz.
  • 0x18 : Frequency 2.2 Hz.
  • 0x20 : Frequency 4.4 Hz.
  • 0x28 : Frequency 8.8 Hz.
  • 0x30 : Be prohibited.
  • 0x38 : Be prohibited.

@description Function set the cutoff frequency by write 8-bit mode to the target _IRSENSE_REG_ECNTL1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_set_hysteresis_eeprom_ir1_ir3()

void irsense_set_hysteresis_eeprom_ir1_ir3 ( irsense_t * ctx,
uint8_t value )

Set hysteresis EEPROM setting of threshold level for channel 1 and channel 3 ( Ir1-Ir3 ) function.

Parameters
ctxClick object.
value8-bit hysteresis setting of threshold level value for channel 1 and channel 3. Number of the bytes to be read

@description Function set hysteresis EEPROM setting of threshold level value for channel 1 and channel 3 ( Ir1-Ir3 ) by write 8-bit hysteresis EEPROM value to the target IRSENSE_EEPROM_MAP_EHYS13 of AK9750 sensor on IR Sense click board.

◆ irsense_set_hysteresis_eeprom_ir2_ir4()

void irsense_set_hysteresis_eeprom_ir2_ir4 ( irsense_t * ctx,
uint8_t value )

Set hysteresis EEPROM setting of threshold level for channel 2 and channel 4 ( Ir2-Ir4 ) function.

Parameters
ctxClick object.
value8-bit hysteresis setting of threshold level value for channel 2 and channel 4.

@description Function set hysteresis EEPROM setting of threshold level value for channel 2 and channel 4 ( Ir2-Ir4 ) by write 8-bit hysteresis EEPROM value to the target IRSENSE_EEPROM_MAP_EHYS24 of AK9750 sensor on IR Sense click board.

◆ irsense_set_hysteresis_ir1_ir3()

void irsense_set_hysteresis_ir1_ir3 ( irsense_t * ctx,
uint8_t value )

Set hysteresis setting of threshold level for channel 1 and channel 3 ( Ir1-Ir3 ) function.

Parameters
ctxClick object.
value8-bit hysteresis setting of threshold level value for channel 1 and channel 3.

@description Function set hysteresis setting of threshold level value for channel 1 and channel 3 ( Ir1-Ir3 ) by write 8-bit hysteresis value to the target IRSENSE_REG_EHYS13 of AK9750 sensor on IR Sense click board.

◆ irsense_set_hysteresis_ir2_ir4()

void irsense_set_hysteresis_ir2_ir4 ( irsense_t * ctx,
uint8_t value )

Set hysteresis setting of threshold level for channel 2 and channel 4 ( Ir2-Ir4 ) function.

Parameters
ctxClick object.
value8-bit hysteresis setting of threshold level value for channel 2 and channel 4.

@description Function set hysteresis setting of threshold level value for channel 2 and channel 4 ( Ir2-Ir4 ) by write 8-bit hysteresis value to the target IRSENSE_REG_EHYS24 of AK9750 sensor on IR Sense click board.

◆ irsense_set_interrupts_reg()

void irsense_set_interrupts_reg ( irsense_t * ctx,
irsense_eint_t * eint )

Sets interrupts activate or inactivate corresponding function.

Parameters
ctxClick object.
eintEnable interrupt.

@description Function sets interrupts activate or inactivate corresponding by write interrupts activate value to the target IRSENSE_REG_EINTEN of AK9750 sensor on IR Sense click board.

◆ irsense_set_mode()

void irsense_set_mode ( irsense_t * ctx,
uint8_t mode )

Set the mode function.

Parameters
ctxClick object.
mode8-bit mode value [ bit2 : bit0 ] :
  • 0x00 : Stand-by Mode.
  • 0x01 : EEPROM Access Mode.
  • 0x02 : Shingle Shot Mode.
  • 0x03 : Be prohibited.
  • 0x04 : Continuous Mode 0.
  • 0x05 : Continuous Mode 1.
  • 0x06 : Continuous Mode 2.
  • 0x07 : Continuous Mode 3.

@description Function set the mode by write 8-bit mode to the target IRSENSE_REG_ECNTL1 register address of AK9750 sensor on IR Sense click board.

◆ irsense_set_threshold_eeprom_ir1_ir3()

void irsense_set_threshold_eeprom_ir1_ir3 ( irsense_t * ctx,
uint8_t value )

Set high or low EEPROM threshold for channel 1 and channel 3 ( Ir1-Ir3 ) function.

Parameters
ctxClick object.
value8-bit threshold value for channel 1 and channel 3.

@description Function set high or low EEPROM threshold level setting for channel 1 and channel 3 ( Ir1-Ir3 ) by write 8-bit value to the two target _IRSENSE_REG_ETH13H_LOW and _IRSENSE_REG_ETH13H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_set_threshold_eeprom_ir2_ir4()

void irsense_set_threshold_eeprom_ir2_ir4 ( irsense_t * ctx,
uint8_t value )

Set high or low EEPROM threshold for channel 2 and channel 4 ( Ir2-Ir4 ) function.

Parameters
ctxClick object.
value8-bit threshold value for channel 2 and channel 4.

@description Function set high or low EEPROM threshold level setting for channel 2 and channel 4 ( Ir2-Ir4 ) by write 8-bit value to the two target _IRSENSE_REG_ETH24H_LOW and _IRSENSE_REG_ETH24H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_set_threshold_ir1_ir3()

void irsense_set_threshold_ir1_ir3 ( irsense_t * ctx,
uint8_t value )

Set high or low threshold for channel 1 and channel 3 ( Ir1-Ir3 ) function.

Parameters
ctxClick object.
value8-bit threshold value for channel 1 and channel 3.

@description Function set high or low threshold level setting for channel 1 and channel 3 ( Ir1-Ir3 ) by write 8-bit value to the two target _IRSENSE_REG_ETH13H_LOW and _IRSENSE_REG_ETH13H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_set_threshold_ir2_ir4()

void irsense_set_threshold_ir2_ir4 ( irsense_t * ctx,
uint8_t value )

Set high or low threshold for channel 2 and channel 4 ( Ir2-Ir4 ) function.

Parameters
ctxClick object.
value8-bit threshold value for channel 2 and channel 4.

@description Function set high or low threshold level setting for channel 2 and channel 4 ( Ir2-Ir4 ) by write 8-bit value to the two target IRSENSE_REG_ETH24H_LOW and IRSENSE_REG_ETH24H_HIGH of AK9750 sensor on IR Sense click board.

◆ irsense_soft_reset()

void irsense_soft_reset ( irsense_t * ctx)

Soft reset function.

Parameters
ctxClick object.

@description Function soft reset by sets Soft Reset bit ( write 0x01 ) to the target IRSENSE_REG_CNTL2 register address of AK9750 sensor on IR Sense click board.

◆ irsense_write_byte()

void irsense_write_byte ( irsense_t * ctx,
uint8_t reg_address,
uint8_t write_data )

Generic write the byte of data function.

Parameters
ctxClick object.
reg_addressRegister address.
write_dataByte of data to write.

@description Function write the 8-bit data to the target 8-bit register address of AK9750 sensor on IR Sense click board.