|
Files | |
file | HTIRS2-driver.h |
HiTechnic IR Seeker V2 driver. | |
Defines | |
#define | HTIRS2_I2C_ADDR 0x10 |
#define | HTIRS2_DSP_MODE 0x41 |
#define | HTIRS2_OFFSET 0x42 |
#define | HTIRS2_DC_DIR 0x00 |
#define | HTIRS2_DC_SSTR1 0x01 |
#define | HTIRS2_DC_SSTR2 0x02 |
#define | HTIRS2_DC_SSTR3 0x03 |
#define | HTIRS2_DC_SSTR4 0x04 |
#define | HTIRS2_DC_SSTR5 0x05 |
#define | HTIRS2_DC_SAVG 0x06 |
#define | HTIRS2_AC_DIR 0x07 |
#define | HTIRS2_AC_SSTR1 0x08 |
#define | HTIRS2_AC_SSTR2 0x09 |
#define | HTIRS2_AC_SSTR3 0x0A |
#define | HTIRS2_AC_SSTR4 0x0B |
#define | HTIRS2_AC_SSTR5 0x0C |
Enumerations | |
enum | tHTIRS2DSPMode { DSP_1200 = 0, DSP_600 = 1 } |
Functions | |
int | HTIRS2readDCDir (tSensors link) |
bool | HTIRS2readAllDCStrength (tSensors link, int &dcS1, int &dcS2, int &dcS3, int &dcS4, int &dcS5) |
int | HTIRS2readDCAverage (tSensors link) |
bool | HTIRS2setDSPMode (tSensors link, tHTIRS2DSPMode mode) |
int | HTIRS2readACDir (tSensors link) |
bool | HTIRS2readAllACStrength (tSensors link, int &acS1, int &acS2, int &acS3, int &acS4, int &acS5) |
int | HTIRS2readDCDir (tMUXSensor muxsensor) |
bool | HTIRS2readAllDCStrength (tMUXSensor muxsensor, int &dcS1, int &dcS2, int &dcS3, int &dcS4, int &dcS5) |
int | HTIRS2readDCAverage (tMUXSensor muxsensor) |
int | HTIRS2readACDir (tMUXSensor muxsensor) |
bool | HTIRS2readAllACStrength (tMUXSensor muxsensor, int &acS1, int &acS2, int &acS3, int &acS4, int &acS5) |
Variables | |
tConfigParams | HTIRS2_config = {HTSMUX_CHAN_I2C, 13, 0x10, 0x42} |
tByteArray | HTIRS2_I2CRequest |
tByteArray | HTIRS2_I2CReply |
HiTechnic IR Seeker V2
#define HTIRS2_AC_DIR 0x07 |
DC Direction data
Definition at line 57 of file HTIRS2-driver.h.
#define HTIRS2_AC_SSTR1 0x08 |
DC Sensor 0 signal strength above average
Definition at line 58 of file HTIRS2-driver.h.
#define HTIRS2_AC_SSTR2 0x09 |
DC Sensor 1 signal strength above average
Definition at line 59 of file HTIRS2-driver.h.
#define HTIRS2_AC_SSTR3 0x0A |
DC Sensor 2 signal strength above average
Definition at line 60 of file HTIRS2-driver.h.
#define HTIRS2_AC_SSTR4 0x0B |
DC Sensor 3 signal strength above average
Definition at line 61 of file HTIRS2-driver.h.
#define HTIRS2_AC_SSTR5 0x0C |
DC Sensor 4 signal strength above average AC DSP modes
Definition at line 62 of file HTIRS2-driver.h.
#define HTIRS2_DC_DIR 0x00 |
DC Direction data
Definition at line 50 of file HTIRS2-driver.h.
#define HTIRS2_DC_SAVG 0x06 |
DC sensor signal strength average
Definition at line 56 of file HTIRS2-driver.h.
#define HTIRS2_DC_SSTR1 0x01 |
DC Sensor 0 signal strength above average
Definition at line 51 of file HTIRS2-driver.h.
#define HTIRS2_DC_SSTR2 0x02 |
DC Sensor 1 signal strength above average
Definition at line 52 of file HTIRS2-driver.h.
#define HTIRS2_DC_SSTR3 0x03 |
DC Sensor 2 signal strength above average
Definition at line 53 of file HTIRS2-driver.h.
#define HTIRS2_DC_SSTR4 0x04 |
DC Sensor 3 signal strength above average
Definition at line 54 of file HTIRS2-driver.h.
#define HTIRS2_DC_SSTR5 0x05 |
DC Sensor 4 signal strength above average
Definition at line 55 of file HTIRS2-driver.h.
#define HTIRS2_DSP_MODE 0x41 |
AC DSP mode - 0 = 1200Hz, 1 = 600Hz
Definition at line 48 of file HTIRS2-driver.h.
#define HTIRS2_I2C_ADDR 0x10 |
IR Seeker I2C device address
Definition at line 47 of file HTIRS2-driver.h.
#define HTIRS2_OFFSET 0x42 |
Offset for data registers
Definition at line 49 of file HTIRS2-driver.h.
enum tHTIRS2DSPMode |
Definition at line 66 of file HTIRS2-driver.h.
int HTIRS2readACDir | ( | tSensors | link ) |
Read the value of the AC Direction data register and return it.
link | the HTIRS2 port number |
Definition at line 276 of file HTIRS2-driver.h.
int HTIRS2readACDir | ( | tMUXSensor | muxsensor ) |
Read the value of the AC Direction data register and return it.
muxsensor | the SMUX sensor port number |
Definition at line 299 of file HTIRS2-driver.h.
bool HTIRS2readAllACStrength | ( | tMUXSensor | muxsensor, |
int & | acS1, | ||
int & | acS2, | ||
int & | acS3, | ||
int & | acS4, | ||
int & | acS5 | ||
) |
Read the value of the all of the internal AC sensors and copy into specified buffer.
muxsensor | the SMUX sensor port number |
acS1 | data from internal sensor nr 1 |
acS2 | data from internal sensor nr 2 |
acS3 | data from internal sensor nr 3 |
acS4 | data from internal sensor nr 4 |
acS5 | data from internal sensor nr 5 |
Definition at line 358 of file HTIRS2-driver.h.
bool HTIRS2readAllACStrength | ( | tSensors | link, |
int & | acS1, | ||
int & | acS2, | ||
int & | acS3, | ||
int & | acS4, | ||
int & | acS5 | ||
) |
Read the value of the all of the internal AC sensors and copy into specified buffer.
link | the HTIRS2 port number |
acS1 | data from internal sensor nr 1 |
acS2 | data from internal sensor nr 2 |
acS3 | data from internal sensor nr 3 |
acS4 | data from internal sensor nr 4 |
acS5 | data from internal sensor nr 5 |
Definition at line 324 of file HTIRS2-driver.h.
bool HTIRS2readAllDCStrength | ( | tMUXSensor | muxsensor, |
int & | dcS1, | ||
int & | dcS2, | ||
int & | dcS3, | ||
int & | dcS4, | ||
int & | dcS5 | ||
) |
Read the value of the all of the internal DC sensors above average.
muxsensor | the SMUX sensor port number |
dcS1 | data from internal sensor nr 1 |
dcS2 | data from internal sensor nr 2 |
dcS3 | data from internal sensor nr 3 |
dcS4 | data from internal sensor nr 4 |
dcS5 | data from internal sensor nr 5 |
Definition at line 184 of file HTIRS2-driver.h.
bool HTIRS2readAllDCStrength | ( | tSensors | link, |
int & | dcS1, | ||
int & | dcS2, | ||
int & | dcS3, | ||
int & | dcS4, | ||
int & | dcS5 | ||
) |
Read the value of the all of the internal DC sensors above average.
link | the HTIRS2 port number |
dcS1 | data from internal sensor nr 1 |
dcS2 | data from internal sensor nr 2 |
dcS3 | data from internal sensor nr 3 |
dcS4 | data from internal sensor nr 4 |
dcS5 | data from internal sensor nr 5 |
Definition at line 150 of file HTIRS2-driver.h.
int HTIRS2readDCAverage | ( | tMUXSensor | muxsensor ) |
Read the value of the average data register and return it.
muxsensor | the SMUX sensor port number |
Definition at line 233 of file HTIRS2-driver.h.
int HTIRS2readDCAverage | ( | tSensors | link ) |
Read the value of the average data register and return it.
link | the HTIRS2 port number |
Definition at line 210 of file HTIRS2-driver.h.
int HTIRS2readDCDir | ( | tMUXSensor | muxsensor ) |
Read the value of the DC Direction data register and return it.
muxsensor | the SMUX sensor port number |
Definition at line 125 of file HTIRS2-driver.h.
int HTIRS2readDCDir | ( | tSensors | link ) |
Read the value of the DC Direction data register and return it.
link | the HTIRS2 port number |
Definition at line 102 of file HTIRS2-driver.h.
bool HTIRS2setDSPMode | ( | tSensors | link, |
tHTIRS2DSPMode | mode | ||
) |
Set the DSP mode of the AC carrier wave detector.
Mode is one of: -DSP_1200 -DSP_600
link | the HTIRS2 port number |
mode | the frequency that should be detected |
Definition at line 260 of file HTIRS2-driver.h.
tConfigParams HTIRS2_config = {HTSMUX_CHAN_I2C, 13, 0x10, 0x42} |
Array to hold SMUX config data for sensor
Definition at line 89 of file HTIRS2-driver.h.
Array to hold I2C reply data
Definition at line 93 of file HTIRS2-driver.h.
Array to hold I2C command data
Definition at line 92 of file HTIRS2-driver.h.