LibDriver AMG8833
Loading...
Searching...
No Matches
driver_amg8833.c File Reference

driver amg8833 source file More...

#include "driver_amg8833.h"
Include dependency graph for driver_amg8833.c:

Go to the source code of this file.

Macros

#define CHIP_NAME   "Panasonic AMG8833"
 chip information definition
#define MANUFACTURER_NAME   "Panasonic"
#define SUPPLY_VOLTAGE_MIN   3.0f
#define SUPPLY_VOLTAGE_MAX   3.6f
#define MAX_CURRENT   5.0f
#define TEMPERATURE_MIN   -20.0f
#define TEMPERATURE_MAX   80.0f
#define DRIVER_VERSION   1000
#define AMG8833_REG_PCTL   0x00
 chip register definition
#define AMG8833_REG_RST   0x01
#define AMG8833_REG_FPSC   0x02
#define AMG8833_REG_INTC   0x03
#define AMG8833_REG_STAT   0x04
#define AMG8833_REG_SCLR   0x05
#define AMG8833_REG_AVE   0x07
#define AMG8833_REG_INTHL   0x08
#define AMG8833_REG_INTHH   0x09
#define AMG8833_REG_INTLL   0x0A
#define AMG8833_REG_INTLH   0x0B
#define AMG8833_REG_IHYSL   0x0C
#define AMG8833_REG_IHYSH   0x0D
#define AMG8833_REG_TTHL   0x0E
#define AMG8833_REG_TTHH   0x0F
#define AMG8833_REG_INT0   0x10
#define AMG8833_REG_INT1   0x11
#define AMG8833_REG_INT2   0x12
#define AMG8833_REG_INT3   0x13
#define AMG8833_REG_INT4   0x14
#define AMG8833_REG_INT5   0x15
#define AMG8833_REG_INT6   0x16
#define AMG8833_REG_INT7   0x17
#define AMG8833_REG_T01L   0x80
#define AMG8833_REG_T01H   0x81

Functions

uint8_t amg8833_set_addr_pin (amg8833_handle_t *handle, amg8833_address_t addr_pin)
 set the iic address pin
uint8_t amg8833_get_addr_pin (amg8833_handle_t *handle, amg8833_address_t *addr_pin)
 get the iic address pin
uint8_t amg8833_init (amg8833_handle_t *handle)
 initialize the chip
uint8_t amg8833_deinit (amg8833_handle_t *handle)
 close the chip
uint8_t amg8833_irq_handler (amg8833_handle_t *handle)
 irq handler
uint8_t amg8833_set_mode (amg8833_handle_t *handle, amg8833_mode_t mode)
 set the mode
uint8_t amg8833_get_mode (amg8833_handle_t *handle, amg8833_mode_t *mode)
 get the mode
uint8_t amg8833_reset (amg8833_handle_t *handle, amg8833_reset_type_t type)
 reset the chip
uint8_t amg8833_set_frame_rate (amg8833_handle_t *handle, amg8833_frame_rate_t rate)
 set the frame rate
uint8_t amg8833_get_frame_rate (amg8833_handle_t *handle, amg8833_frame_rate_t *rate)
 get the frame rate
uint8_t amg8833_set_interrupt_mode (amg8833_handle_t *handle, amg8833_interrupt_mode_t mode)
 set the interrupt mode
uint8_t amg8833_get_interrupt_mode (amg8833_handle_t *handle, amg8833_interrupt_mode_t *mode)
 get the interrupt mode
uint8_t amg8833_set_interrupt (amg8833_handle_t *handle, amg8833_bool_t enable)
 enable or disable the interrupt
uint8_t amg8833_get_interrupt (amg8833_handle_t *handle, amg8833_bool_t *enable)
 get the interrupt status
uint8_t amg8833_get_status (amg8833_handle_t *handle, uint8_t *status)
 get the status
uint8_t amg8833_clear_status (amg8833_handle_t *handle, amg8833_status_t status)
 clear the interrupt status
uint8_t amg8833_set_average_mode (amg8833_handle_t *handle, amg8833_average_mode_t mode)
 set the average_mode
uint8_t amg8833_get_average_mode (amg8833_handle_t *handle, amg8833_average_mode_t *mode)
 get the average_mode
uint8_t amg8833_set_interrupt_high_level (amg8833_handle_t *handle, int16_t level)
 set the interrupt high level
uint8_t amg8833_get_interrupt_high_level (amg8833_handle_t *handle, int16_t *level)
 get the interrupt high level
uint8_t amg8833_set_interrupt_low_level (amg8833_handle_t *handle, int16_t level)
 set the interrupt low level
uint8_t amg8833_get_interrupt_low_level (amg8833_handle_t *handle, int16_t *level)
 get the interrupt low level
uint8_t amg8833_set_interrupt_hysteresis_level (amg8833_handle_t *handle, int16_t level)
 set the interrupt hysteresis level
uint8_t amg8833_get_interrupt_hysteresis_level (amg8833_handle_t *handle, int16_t *level)
 get the interrupt hysteresis level
uint8_t amg8833_interrupt_level_convert_to_register (amg8833_handle_t *handle, float temp, int16_t *reg)
 convert the interrupt level to the register raw data
uint8_t amg8833_interrupt_level_convert_to_data (amg8833_handle_t *handle, int16_t reg, float *temp)
 convert the register raw data to the interrupt level
uint8_t amg8833_read_temperature (amg8833_handle_t *handle, int16_t *raw, float *temp)
 read the temperature
uint8_t amg8833_read_temperature_array (amg8833_handle_t *handle, int16_t raw[8][8], float temp[8][8])
 read the temperature array
uint8_t amg8833_get_interrupt_table (amg8833_handle_t *handle, uint8_t table[8][1])
 get the interrupt table
uint8_t amg8833_set_reg (amg8833_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t amg8833_get_reg (amg8833_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register
uint8_t amg8833_info (amg8833_info_t *info)
 get chip's information

Detailed Description

driver amg8833 source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2022-01-01

history

Date Version Author Description
2022/01/01 1.0 Shifeng Li first upload

Definition in file driver_amg8833.c.

Macro Definition Documentation

◆ AMG8833_REG_AVE

#define AMG8833_REG_AVE   0x07

moving average output mode register

Definition at line 60 of file driver_amg8833.c.

◆ AMG8833_REG_FPSC

#define AMG8833_REG_FPSC   0x02

frame rate register

Definition at line 56 of file driver_amg8833.c.

◆ AMG8833_REG_IHYSH

#define AMG8833_REG_IHYSH   0x0D

interrupt hysteresis value upper level register

Definition at line 66 of file driver_amg8833.c.

◆ AMG8833_REG_IHYSL

#define AMG8833_REG_IHYSL   0x0C

interrupt hysteresis value lower level register

Definition at line 65 of file driver_amg8833.c.

◆ AMG8833_REG_INT0

#define AMG8833_REG_INT0   0x10

pixel 1 - 8 interrupt result register

Definition at line 69 of file driver_amg8833.c.

◆ AMG8833_REG_INT1

#define AMG8833_REG_INT1   0x11

pixel 9 - 16 interrupt result register

Definition at line 70 of file driver_amg8833.c.

◆ AMG8833_REG_INT2

#define AMG8833_REG_INT2   0x12

pixel 17 - 24 interrupt result register

Definition at line 71 of file driver_amg8833.c.

◆ AMG8833_REG_INT3

#define AMG8833_REG_INT3   0x13

pixel 25 - 32 interrupt result register

Definition at line 72 of file driver_amg8833.c.

◆ AMG8833_REG_INT4

#define AMG8833_REG_INT4   0x14

pixel 33 - 40 interrupt result register

Definition at line 73 of file driver_amg8833.c.

◆ AMG8833_REG_INT5

#define AMG8833_REG_INT5   0x15

pixel 41 - 48 interrupt result register

Definition at line 74 of file driver_amg8833.c.

◆ AMG8833_REG_INT6

#define AMG8833_REG_INT6   0x16

pixel 49 - 56 interrupt result register

Definition at line 75 of file driver_amg8833.c.

◆ AMG8833_REG_INT7

#define AMG8833_REG_INT7   0x17

pixel 57 - 64 interrupt result register

Definition at line 76 of file driver_amg8833.c.

◆ AMG8833_REG_INTC

#define AMG8833_REG_INTC   0x03

interrupt function register

Definition at line 57 of file driver_amg8833.c.

◆ AMG8833_REG_INTHH

#define AMG8833_REG_INTHH   0x09

interrupt upper value upper level register

Definition at line 62 of file driver_amg8833.c.

◆ AMG8833_REG_INTHL

#define AMG8833_REG_INTHL   0x08

interrupt upper value lower level register

Definition at line 61 of file driver_amg8833.c.

◆ AMG8833_REG_INTLH

#define AMG8833_REG_INTLH   0x0B

interrupt lower value upper level register

Definition at line 64 of file driver_amg8833.c.

◆ AMG8833_REG_INTLL

#define AMG8833_REG_INTLL   0x0A

interrupt lower value lower level register

Definition at line 63 of file driver_amg8833.c.

◆ AMG8833_REG_PCTL

#define AMG8833_REG_PCTL   0x00

chip register definition

power control register

Definition at line 54 of file driver_amg8833.c.

◆ AMG8833_REG_RST

#define AMG8833_REG_RST   0x01

software reset register

Definition at line 55 of file driver_amg8833.c.

◆ AMG8833_REG_SCLR

#define AMG8833_REG_SCLR   0x05

interrupt flag clear register

Definition at line 59 of file driver_amg8833.c.

◆ AMG8833_REG_STAT

#define AMG8833_REG_STAT   0x04

interrupt flag, low voltage flag register

Definition at line 58 of file driver_amg8833.c.

◆ AMG8833_REG_T01H

#define AMG8833_REG_T01H   0x81

pixel 1 output value upper level register

Definition at line 78 of file driver_amg8833.c.

◆ AMG8833_REG_T01L

#define AMG8833_REG_T01L   0x80

pixel 1 output value lower level register

Definition at line 77 of file driver_amg8833.c.

◆ AMG8833_REG_TTHH

#define AMG8833_REG_TTHH   0x0F

thermistor output value upper level register

Definition at line 68 of file driver_amg8833.c.

◆ AMG8833_REG_TTHL

#define AMG8833_REG_TTHL   0x0E

thermistor output value lower level register

Definition at line 67 of file driver_amg8833.c.

◆ CHIP_NAME

#define CHIP_NAME   "Panasonic AMG8833"

chip information definition

chip name

Definition at line 42 of file driver_amg8833.c.

◆ DRIVER_VERSION

#define DRIVER_VERSION   1000

driver version

Definition at line 49 of file driver_amg8833.c.

◆ MANUFACTURER_NAME

#define MANUFACTURER_NAME   "Panasonic"

manufacturer name

Definition at line 43 of file driver_amg8833.c.

◆ MAX_CURRENT

#define MAX_CURRENT   5.0f

chip max current

Definition at line 46 of file driver_amg8833.c.

◆ SUPPLY_VOLTAGE_MAX

#define SUPPLY_VOLTAGE_MAX   3.6f

chip max supply voltage

Definition at line 45 of file driver_amg8833.c.

◆ SUPPLY_VOLTAGE_MIN

#define SUPPLY_VOLTAGE_MIN   3.0f

chip min supply voltage

Definition at line 44 of file driver_amg8833.c.

◆ TEMPERATURE_MAX

#define TEMPERATURE_MAX   80.0f

chip max operating temperature

Definition at line 48 of file driver_amg8833.c.

◆ TEMPERATURE_MIN

#define TEMPERATURE_MIN   -20.0f

chip min operating temperature

Definition at line 47 of file driver_amg8833.c.