IRPyro API
(sKEMLIB1)
Collection of routines and data structures covering the functionality of the IRPyro sensor
|
IRPyro Application interface functions implementation More...
Go to the source code of this file.
Data Structures | |
struct | notice |
Checksum string for the IRPyro API. More... | |
Functions | |
static uint8_t | AFE_init (IRPyro_sensor_device_type *this_device) |
Initializes the AFE register with this_device values. More... | |
static uint8_t | AFE_read (IRPyro_sensor_device_type *this_device, AFE_reg_type *AFE_data) |
reads the AFE register on the IRPyro and loads into this_device More... | |
static uint8_t | AFE_register_empty (AFE_reg_type first) |
Checks if the AFE register is empty. More... | |
static void | AFE_to_bytes (AFE_reg_type AFE_register, uint8_t *AFE_byte) |
encodes the AFE register contents of this_device into the IRPyro More... | |
static uint8_t | AFE_write (IRPyro_sensor_device_type *this_device) |
writes the AFE register contents of this_device into the IRPyro More... | |
static void | bytes_to_AFE (uint8_t *AFE_bytes, AFE_reg_type *AFE_register) |
decodes the AFE register of the IRPyro into this_device More... | |
static void | bytes_to_CCP (uint8_t CCP_byte, CCP_reg_type *CCP_register) |
decodes the CCP register of the IRPyro into this_device More... | |
static void | bytes_to_WUP (uint8_t *WUP_bytes, WUP_reg_type *WUP_register) |
decodes the WUP register of the IRPyro into this_device More... | |
static uint8_t | CCP_init (IRPyro_sensor_device_type *this_device) |
Initializes the CCP register with this_device values. More... | |
static uint8_t | CCP_read (IRPyro_sensor_device_type *this_device, CCP_reg_type *CCP_data) |
reads the CCP registers on the IRPyro and loads into this_device More... | |
static uint8_t | CCP_register_empty (CCP_reg_type first) |
Checks if the CCP register is empty. More... | |
static void | CCP_to_bytes (CCP_reg_type CCP_register, uint8_t *CCP_byte) |
encodes the CCP register contents of this_device into IRPyro More... | |
static uint8_t | CCP_write (IRPyro_sensor_device_type *this_device) |
writes the CCP registers contents of this_device into the IRPyro More... | |
static uint8_t | channel_value_decode (IRPyro_sensor_device_type *this_device) |
Decodes the channel values on a given frame. More... | |
static struct notice | IRPyro_checksum (void) |
uint8_t | IRPyro_close (IRPyro_sensor_device_type *this_device) |
Stops streaming, deallocates memory and disable the IRPyro sensor. More... | |
uint8_t | IRPyro_ioctl (IRPyro_sensor_device_type *this_device, IRPyro_cmd_type *cmd, IRPyro_arg_type arg) |
access to IRPyro registers More... | |
uint8_t | IRPyro_open (IRPyro_sensor_device_type *this_device) |
Initializes the IRPyro device. More... | |
static uint8_t | IRPyro_power_mode_low_set (IRPyro_sensor_device_type *this_device) |
activates the low power mode settings stored on the IRPyro structure More... | |
static uint8_t | IRPyro_power_mode_normal_set (IRPyro_sensor_device_type *this_device) |
activates the normal power mode settings stored on the IRPyro structure More... | |
static uint8_t | IRPyro_power_mode_sleep_set (IRPyro_sensor_device_type *this_device) |
The device will automatically enter either low power or normal power sleep mode depending in the power state the device is in when it is put to sleep. The WUP register contains the settings for either sleep mode. More... | |
static uint8_t | IRPyro_power_mode_wakeup_set (IRPyro_sensor_device_type *this_device) |
The device will automatically enter either low power or normal power sleep mode depending in the power state the device is in when it is put to sleep. The WUP register contains the settings for either sleep mode. More... | |
static uint8_t | IRPyro_power_settings_init (IRPyro_sensor_device_type *this_device) |
initializes with defaults the power settings of an IRPyro device More... | |
uint8_t | IRPyro_read (IRPyro_sensor_device_type *this_device) |
Reads a frame of data from the IRPyro. More... | |
static uint8_t | IRPyro_test (IRPyro_sensor_device_type *this_device) |
Sends test code to the IRPyro sensor to confirm is there. More... | |
static uint8_t | FIFO_data_active_get (IRPyro_sensor_device_type *this_device) |
Read data packet (up to 17 bytes) for only active channel. More... | |
static uint8_t | FIFO_ready_status_get (IRPyro_sensor_device_type *this_device) |
Ask the IRPyro if a frame of data is available used when a polling reading operation has started. More... | |
static uint8_t | FIFO_reset (IRPyro_sensor_device_type *this_device) |
Clear the entire FIFO (Rd/Wr pointer reset with the Empty) More... | |
static uint8_t | I2C_address_set (IRPyro_sensor_device_type *this_device) |
Sends new I2C address to the IRPyro sensor Default i2c address is 0x65, if multiple devices are being used care needs to be taken when writing new i2c addresses by switching off other devices with the same address. More... | |
static uint8_t | WUP_init (IRPyro_sensor_device_type *this_device) |
Initializes the WUP register with this_device values. More... | |
static uint8_t | WUP_read (IRPyro_sensor_device_type *this_device, WUP_reg_type *WUP_data) |
reads the WUP register on the IRPyro and loads into this_device More... | |
static uint8_t | WUP_register_empty (WUP_reg_type first) |
Checks if the AFE register is empty. More... | |
static void | WUP_to_bytes (WUP_reg_type WUP_register, uint8_t *WUP_byte) |
encodes the WUP register contents of this_device into the IRPyro More... | |
static uint8_t | WUP_write (IRPyro_sensor_device_type *this_device) |
writes the WUP register contents of this_device into the IRPyro More... | |
IRPyro Application interface functions implementation
=============================================================================== ##### How to use this driver ##### =============================================================================== [..] (#) Declare an IRPyro_sensor_device_type in your code (#) Fill the values for CS, INT and address (#) Fill the values for number_of_active_channels and read_mode (#) AFE, CCP and WUP can be left empty if desired, configuration macros will fill them with default values (#) Call IRPyro_open() to commit the values to the physical IRPyro (#) IRPyro_read() retrieves the values sampled by the IRPyro sensor (#) Modify the IRPyro settings using IRPyro_IOCTL() (#) Close the device when finished using IRPyro_read() [..]
Copyright (c) 2018, _KEMET, Ltd All rights reserved. THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file IRPyro_API_single_device_layer.c.