LibDriver AMG8833
Loading...
Searching...
No Matches
amg8833 basic driver function

amg8833 basic driver modules More...

Collaboration diagram for amg8833 basic driver function:

Data Structures

struct  amg8833_handle_s
 amg8833 handle structure definition More...
struct  amg8833_info_s
 amg8833 information structure definition More...

Typedefs

typedef struct amg8833_handle_s amg8833_handle_t
 amg8833 handle structure definition
typedef struct amg8833_info_s amg8833_info_t
 amg8833 information structure definition

Enumerations

enum  amg8833_address_t { AMG8833_ADDRESS_0 = 0xD0 , AMG8833_ADDRESS_1 = 0xD2 }
 amg8833 address enumeration definition More...
enum  amg8833_bool_t { AMG8833_BOOL_FALSE = 0x00 , AMG8833_BOOL_TRUE = 0x01 }
 amg8833 bool enumeration definition More...
enum  amg8833_mode_t { AMG8833_MODE_NORMAL = 0x00 , AMG8833_MODE_SLEEP = 0x10 , AMG8833_MODE_STAND_BY_60S = 0x20 , AMG8833_MODE_STAND_BY_10S = 0x21 }
 amg8833 mode enumeration definition More...
enum  amg8833_reset_type_t { AMG8833_RESET_TYPE_FLAG = 0x30 , AMG8833_RESET_TYPE_INIT = 0x3F }
 amg8833 reset type enumeration definition More...
enum  amg8833_frame_rate_t { AMG8833_FRAME_RATE_10_FPS = 0x00 , AMG8833_FRAME_RATE_1_FPS = 0x01 }
 amg8833 frame rate enumeration definition More...
enum  amg8833_interrupt_mode_t { AMG8833_INTERRUPT_MODE_DIFFERENCE = 0x00 , AMG8833_INTERRUPT_MODE_ABSOLUTE = 0x01 }
 amg8833 interrupt mode enumeration definition More...
enum  amg8833_status_t { AMG8833_STATUS_OVF_THS = 0x03 , AMG8833_STATUS_OVF_IRS = 0x02 , AMG8833_STATUS_INTF = 0x01 }
 amg8833 status enumeration definition More...
enum  amg8833_average_mode_t { AMG8833_AVERAGE_MODE_ONCE = 0x00 , AMG8833_AVERAGE_MODE_TWICE = 0x01 }
 amg8833 average mode enumeration definition More...

Functions

uint8_t amg8833_info (amg8833_info_t *info)
 get chip's information
uint8_t amg8833_irq_handler (amg8833_handle_t *handle)
 irq handler
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_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_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

Detailed Description

amg8833 basic driver modules

Typedef Documentation

◆ amg8833_handle_t

amg8833 handle structure definition

◆ amg8833_info_t

amg8833 information structure definition

Enumeration Type Documentation

◆ amg8833_address_t

amg8833 address enumeration definition

Enumerator
AMG8833_ADDRESS_0 

ad select pin connected to the GND

AMG8833_ADDRESS_1 

ad select pin connected to the VCC

Definition at line 62 of file driver_amg8833.h.

◆ amg8833_average_mode_t

amg8833 average mode enumeration definition

Enumerator
AMG8833_AVERAGE_MODE_ONCE 

once moving average output mode

AMG8833_AVERAGE_MODE_TWICE 

twice moving average output mode

Definition at line 128 of file driver_amg8833.h.

◆ amg8833_bool_t

amg8833 bool enumeration definition

Enumerator
AMG8833_BOOL_FALSE 

false

AMG8833_BOOL_TRUE 

true

Definition at line 71 of file driver_amg8833.h.

◆ amg8833_frame_rate_t

amg8833 frame rate enumeration definition

Enumerator
AMG8833_FRAME_RATE_10_FPS 

10 fps

AMG8833_FRAME_RATE_1_FPS 

1 fps

Definition at line 100 of file driver_amg8833.h.

◆ amg8833_interrupt_mode_t

amg8833 interrupt mode enumeration definition

Enumerator
AMG8833_INTERRUPT_MODE_DIFFERENCE 

difference interrupt mode

AMG8833_INTERRUPT_MODE_ABSOLUTE 

absolute value interrupt mode

Definition at line 109 of file driver_amg8833.h.

◆ amg8833_mode_t

amg8833 mode enumeration definition

Enumerator
AMG8833_MODE_NORMAL 

normal mode

AMG8833_MODE_SLEEP 

sleep mode

AMG8833_MODE_STAND_BY_60S 

stand-by 60s mode

AMG8833_MODE_STAND_BY_10S 

stand-by 10s mode

Definition at line 80 of file driver_amg8833.h.

◆ amg8833_reset_type_t

amg8833 reset type enumeration definition

Enumerator
AMG8833_RESET_TYPE_FLAG 

flag reset type

AMG8833_RESET_TYPE_INIT 

initial reset type

Definition at line 91 of file driver_amg8833.h.

◆ amg8833_status_t

amg8833 status enumeration definition

Enumerator
AMG8833_STATUS_OVF_THS 

thermistor temperature output overflow

AMG8833_STATUS_OVF_IRS 

temperature output overflow

AMG8833_STATUS_INTF 

interrupt outbreak

Definition at line 118 of file driver_amg8833.h.

Function Documentation

◆ amg8833_clear_status()

uint8_t amg8833_clear_status ( amg8833_handle_t * handle,
amg8833_status_t status )

clear the interrupt status

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]statusinterrupt status
Returns
status code
  • 0 success
  • 1 clear status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 781 of file driver_amg8833.c.

◆ amg8833_deinit()

uint8_t amg8833_deinit ( amg8833_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an amg8833 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 278 of file driver_amg8833.c.

◆ amg8833_get_addr_pin()

uint8_t amg8833_get_addr_pin ( amg8833_handle_t * handle,
amg8833_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*addr_pinpointer to an address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 156 of file driver_amg8833.c.

◆ amg8833_get_average_mode()

uint8_t amg8833_get_average_mode ( amg8833_handle_t * handle,
amg8833_average_mode_t * mode )

get the average_mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*modepointer to an average mode buffer
Returns
status code
  • 0 success
  • 1 get average mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 863 of file driver_amg8833.c.

◆ amg8833_get_frame_rate()

uint8_t amg8833_get_frame_rate ( amg8833_handle_t * handle,
amg8833_frame_rate_t * rate )

get the frame rate

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*ratepointer to a frame rate buffer
Returns
status code
  • 0 success
  • 1 get frame rate failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 543 of file driver_amg8833.c.

◆ amg8833_get_interrupt()

uint8_t amg8833_get_interrupt ( amg8833_handle_t * handle,
amg8833_bool_t * enable )

get the interrupt status

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 707 of file driver_amg8833.c.

◆ amg8833_get_interrupt_high_level()

uint8_t amg8833_get_interrupt_high_level ( amg8833_handle_t * handle,
int16_t * level )

get the interrupt high level

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*levelpointer to an interrupt high level buffer
Returns
status code
  • 0 success
  • 1 get interrupt high level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 945 of file driver_amg8833.c.

◆ amg8833_get_interrupt_hysteresis_level()

uint8_t amg8833_get_interrupt_hysteresis_level ( amg8833_handle_t * handle,
int16_t * level )

get the interrupt hysteresis level

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*levelpointer to an interrupt hysteresis level buffer
Returns
status code
  • 0 success
  • 1 get interrupt hysteresis level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1139 of file driver_amg8833.c.

◆ amg8833_get_interrupt_low_level()

uint8_t amg8833_get_interrupt_low_level ( amg8833_handle_t * handle,
int16_t * level )

get the interrupt low level

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*levelpointer to an interrupt low level buffer
Returns
status code
  • 0 success
  • 1 get interrupt low level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1042 of file driver_amg8833.c.

◆ amg8833_get_interrupt_mode()

uint8_t amg8833_get_interrupt_mode ( amg8833_handle_t * handle,
amg8833_interrupt_mode_t * mode )

get the interrupt mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*modepointer to an interrupt mode buffer
Returns
status code
  • 0 success
  • 1 get interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 625 of file driver_amg8833.c.

◆ amg8833_get_interrupt_table()

uint8_t amg8833_get_interrupt_table ( amg8833_handle_t * handle,
uint8_t table[8][1] )

get the interrupt table

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]**tablepointer to an interrupt table buffer
Returns
status code
  • 0 success
  • 1 get interrupt table failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
pixel_64 pixel_63 ... pixel_57 (bit) . . . . . . . . . .
pixel_08 pixel_07 ... pixel_01

Definition at line 1357 of file driver_amg8833.c.

◆ amg8833_get_mode()

uint8_t amg8833_get_mode ( amg8833_handle_t * handle,
amg8833_mode_t * mode )

get the mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 424 of file driver_amg8833.c.

◆ amg8833_get_status()

uint8_t amg8833_get_status ( amg8833_handle_t * handle,
uint8_t * status )

get the status

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 744 of file driver_amg8833.c.

◆ amg8833_info()

uint8_t amg8833_info ( amg8833_info_t * info)

get chip's information

Parameters
[out]*infopointer to an amg8833 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1492 of file driver_amg8833.c.

◆ amg8833_init()

uint8_t amg8833_init ( amg8833_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an amg8833 handle structure
Returns
status code
  • 0 success
  • 1 iic initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 reset failed
Note
none

Definition at line 179 of file driver_amg8833.c.

◆ amg8833_interrupt_level_convert_to_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

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]regregister raw data
[out]*temppointer to a temperature buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1218 of file driver_amg8833.c.

◆ amg8833_interrupt_level_convert_to_register()

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

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]temptemperature
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1191 of file driver_amg8833.c.

◆ amg8833_irq_handler()

uint8_t amg8833_irq_handler ( amg8833_handle_t * handle)

irq handler

Parameters
[in]*handlepointer to an amg8833 handle structure
Returns
status code
  • 0 success
  • 1 run failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 324 of file driver_amg8833.c.

◆ amg8833_read_temperature()

uint8_t amg8833_read_temperature ( amg8833_handle_t * handle,
int16_t * raw,
float * temp )

read the temperature

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]*rawpointer to a raw temperature buffer
[out]*temppointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 read temperature failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1246 of file driver_amg8833.c.

◆ amg8833_read_temperature_array()

uint8_t amg8833_read_temperature_array ( amg8833_handle_t * handle,
int16_t raw[8][8],
float temp[8][8] )

read the temperature array

Parameters
[in]*handlepointer to an amg8833 handle structure
[out]**rawpointer to a raw temperature buffer
[out]**temppointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 read temperature array failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
pixel_64 pixel_63 ... pixel_57 . . . . . . . . . .
pixel_08 pixel_07 ... pixel_01

Definition at line 1304 of file driver_amg8833.c.

◆ amg8833_reset()

uint8_t amg8833_reset ( amg8833_handle_t * handle,
amg8833_reset_type_t type )

reset the chip

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]typereset type
Returns
status code
  • 0 success
  • 1 reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 461 of file driver_amg8833.c.

◆ amg8833_set_addr_pin()

uint8_t amg8833_set_addr_pin ( amg8833_handle_t * handle,
amg8833_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]addr_pinaddress pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 135 of file driver_amg8833.c.

◆ amg8833_set_average_mode()

uint8_t amg8833_set_average_mode ( amg8833_handle_t * handle,
amg8833_average_mode_t mode )

set the average_mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]modeaverage mode
Returns
status code
  • 0 success
  • 1 set average mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 818 of file driver_amg8833.c.

◆ amg8833_set_frame_rate()

uint8_t amg8833_set_frame_rate ( amg8833_handle_t * handle,
amg8833_frame_rate_t rate )

set the frame rate

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]rateframe rate
Returns
status code
  • 0 success
  • 1 set frame rate failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 498 of file driver_amg8833.c.

◆ amg8833_set_interrupt()

uint8_t amg8833_set_interrupt ( amg8833_handle_t * handle,
amg8833_bool_t enable )

enable or disable the interrupt

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 662 of file driver_amg8833.c.

◆ amg8833_set_interrupt_high_level()

uint8_t amg8833_set_interrupt_high_level ( amg8833_handle_t * handle,
int16_t level )

set the interrupt high level

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]levelinterrupt high level
Returns
status code
  • 0 success
  • 1 set interrupt high level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 900 of file driver_amg8833.c.

◆ amg8833_set_interrupt_hysteresis_level()

uint8_t amg8833_set_interrupt_hysteresis_level ( amg8833_handle_t * handle,
int16_t level )

set the interrupt hysteresis level

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]levelinterrupt hysteresis level
Returns
status code
  • 0 success
  • 1 set interrupt hysteresis level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1094 of file driver_amg8833.c.

◆ amg8833_set_interrupt_low_level()

uint8_t amg8833_set_interrupt_low_level ( amg8833_handle_t * handle,
int16_t level )

set the interrupt low level

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]levelinterrupt low level
Returns
status code
  • 0 success
  • 1 set interrupt low level failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 997 of file driver_amg8833.c.

◆ amg8833_set_interrupt_mode()

uint8_t amg8833_set_interrupt_mode ( amg8833_handle_t * handle,
amg8833_interrupt_mode_t mode )

set the interrupt mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]modeinterrupt mode
Returns
status code
  • 0 success
  • 1 set interrupt mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 580 of file driver_amg8833.c.

◆ amg8833_set_mode()

uint8_t amg8833_set_mode ( amg8833_handle_t * handle,
amg8833_mode_t mode )

set the mode

Parameters
[in]*handlepointer to an amg8833 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 387 of file driver_amg8833.c.