Loading...
Searching...
No Matches

Interface definition for the AMG88xx infrared array sensor driver. More...

Detailed Description

Interface definition for the AMG88xx infrared array sensor driver.

Author
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file amg88xx.h.

#include <stdbool.h>
#include <stdint.h>
#include <errno.h>
#include "periph/i2c.h"
#include "periph/gpio.h"
#include "saul.h"
#include "amg88xx_constants.h"
+ Include dependency graph for amg88xx.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  amg88xx_params_t
 Device initialization parameters. More...
 
struct  amg88xx_t
 Device descriptor for the driver. More...
 

Macros

#define AMG88XX_PIXELS_HORIZONTAL   (8)
 Dimensions of a frame.
 
#define AMG88XX_PIXELS_VERTICAL   (8)
 Number of vertical pixels.
 
#define AMG88XX_PIXELS_COUNT   (64)
 Number of pixels per frame.
 
#define AMG88XX_BYTES_PER_PIXEL   (2)
 Size of pixel data.
 
#define AMG88XX_BYTES_PER_FRAME   (128)
 Bytes per frame.
 

Typedefs

typedef void(* amg88xx_int_cb_t) (void *)
 Interrupt callback type.
 

Enumerations

enum  amg88xx_fps_t { AMG88XX_FPS_10 = 0x00 , AMG88XX_FPS_1 = 0x01 }
 Frame rate options. More...
 
enum  amg88xx_mode_t { AMG88XX_MODE_NORMAL = 0x00 , AMG88XX_MODE_SLEEP = 0x10 , AMG88XX_MODE_STANDBY_60S = 0x20 , AMG88XX_MODE_STANDBY_10S = 0x21 }
 Operating mode options. More...
 
enum  amg88xx_interrupt_mode_t { AMG88XX_INT_DIFFERENCE = 0x00 , AMG88XX_INT_ABSOLUTE = 0x01 }
 Interrupt mode options. More...
 

Functions

int amg88xx_set_fps (const amg88xx_t *dev, amg88xx_fps_t fps)
 Set the frame rate.
 
int amg88xx_get_fps (const amg88xx_t *dev, amg88xx_fps_t *fps)
 Get the current frame rate.
 
int amg88xx_set_mode (amg88xx_t *dev, amg88xx_mode_t mode)
 Set the operating mode.
 
int amg88xx_get_mode (const amg88xx_t *dev, amg88xx_mode_t *mode)
 Get the current operating mode.
 
int amg88xx_set_averaging (const amg88xx_t *dev, bool enabled)
 Enable or disable twice moving average mode.
 
int amg88xx_get_averaging (const amg88xx_t *dev, bool *enabled)
 Get the current averaging mode.
 
int amg88xx_get_temperature (const amg88xx_t *dev, int16_t *temperature)
 Read the thermistor (chip) temperature.
 
int amg88xx_get_frame (const amg88xx_t *dev, int16_t pixels[AMG88XX_PIXELS_COUNT])
 Read a 8x8 frame of thermal pixel data.
 
int amg88xx_init_int (amg88xx_t *dev, amg88xx_int_cb_t cb, void *arg)
 Initialize the interrupt pin.
 
int amg88xx_set_interrupt (const amg88xx_t *dev, amg88xx_interrupt_mode_t mode, bool enabled)
 Enable or disable the interrupt with the given mode.
 
int amg88xx_get_interrupt (const amg88xx_t *dev, amg88xx_interrupt_mode_t *mode, bool *enabled)
 Get the current interrupt configuration.
 
int amg88xx_set_interrupt_levels (const amg88xx_t *dev, int16_t upper, int16_t lower, int16_t hysteresis)
 Set the interrupt threshold levels.
 
int amg88xx_get_interrupt_levels (const amg88xx_t *dev, int16_t *upper, int16_t *lower, int16_t *hysteresis)
 Get the current interrupt threshold levels.
 
int amg88xx_get_interrupt_table (const amg88xx_t *dev, uint8_t table[8])
 Read the interrupt table.
 
int amg88xx_get_status (const amg88xx_t *dev, uint8_t *status)
 Read the status register.
 
int amg88xx_clear_status (const amg88xx_t *dev)
 Clear all status and interrupt flags.
 
int amg88xx_init (amg88xx_t *dev, const amg88xx_params_t *params)
 Initialize the given sensor.
 
static int16_t amg88xx_raw_to_temperature (int16_t raw)
 Convert a raw pixel value to temperature in centi-degrees Celsius.
 
static int16_t amg88xx_temperature_to_raw (int16_t temperature)
 Convert a temperature in centi-degrees Celsius to a raw pixel value.
 

Variables

const saul_driver_t amg88xx_temperature_saul_driver
 Export of SAUL interface for temperature sensor.