ambient17 2.0.0.0
|
This file contains API for Ambient 17 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | ambient17_t |
Ambient 17 Click context object. More... | |
struct | ambient17_cfg_t |
Ambient 17 Click configuration object. More... | |
Macros | |
#define | AMBIENT17_REG_ENABLE 0x00 |
Ambient 17 registers list. | |
#define | AMBIENT17_REG_ATIME 0x01 |
#define | AMBIENT17_REG_WTIME 0x03 |
#define | AMBIENT17_REG_AILTL 0x04 |
#define | AMBIENT17_REG_AILTH 0x05 |
#define | AMBIENT17_REG_AIHTL 0x06 |
#define | AMBIENT17_REG_AIHTH 0x07 |
#define | AMBIENT17_REG_PERS 0x0C |
#define | AMBIENT17_REG_CONFIG 0x0D |
#define | AMBIENT17_REG_CONTROL 0x0F |
#define | AMBIENT17_REG_ID 0x12 |
#define | AMBIENT17_REG_STATUS 0x13 |
#define | AMBIENT17_REG_C0DATA 0x14 |
#define | AMBIENT17_REG_C0DATAH 0x15 |
#define | AMBIENT17_REG_C1DATA 0x16 |
#define | AMBIENT17_REG_C1DATAH 0x17 |
#define | AMBIENT17_CMD_BIT 0x80 |
Ambient 17 command register setting. | |
#define | AMBIENT17_TYPE_REPEATED 0x00 |
#define | AMBIENT17_TYPE_AUTO_INC 0x20 |
#define | AMBIENT17_TYPE_SPEC_FUNC 0x60 |
#define | AMBIENT17_SPEC_FUNC_INT_CLEAR 0x06 |
#define | AMBIENT17_ENABLE_SLEEP_AFTER_INT 0x40 |
Ambient 17 enable register setting. | |
#define | AMBIENT17_ENABLE_ALS_INT 0x10 |
#define | AMBIENT17_ENABLE_WAIT 0x08 |
#define | AMBIENT17_ENABLE_ALS 0x02 |
#define | AMBIENT17_ENABLE_OSC 0x01 |
#define | AMBIENT17_STATUS_AINT 0x10 |
Ambient 17 status register setting. | |
#define | AMBIENT17_STATUS_AVALID 0x01 |
#define | AMBIENT17_ATIME_MAX 699.88 |
Ambient 17 atime register setting. | |
#define | AMBIENT17_ATIME_MIN 2.73 |
#define | AMBIENT17_ATIME_STEP 2.73 |
#define | AMBIENT17_DEFAULT_ATIME 200.0 |
#define | AMBIENT17_WTIME_MAX 699.88 |
Ambient 17 wtime register setting. | |
#define | AMBIENT17_WTIME_MIN 2.73 |
#define | AMBIENT17_WTIME_STEP 2.73 |
#define | AMBIENT17_DEFAULT_WTIME 200.0 |
#define | AMBIENT17_AGAIN_1X 0x00 |
Ambient 17 control register setting. | |
#define | AMBIENT17_AGAIN_8X 0x01 |
#define | AMBIENT17_AGAIN_16X 0x02 |
#define | AMBIENT17_AGAIN_120X 0x03 |
#define | AMBIENT17_CH0_COFF0 1.0 |
Ambient 17 lux calculation coefficients. | |
#define | AMBIENT17_CH1_COFF0 1.87 |
#define | AMBIENT17_CH0_COFF1 0.63 |
#define | AMBIENT17_CH1_COFF1 1.0 |
#define | AMBIENT17_GA_VALUE 1.0 |
#define | AMBIENT17_GA_MULTIPLIER 60.0 |
#define | AMBIENT17_DEVICE_ID 0x34 |
Ambient 17 ID values. | |
#define | AMBIENT17_DEVICE_ADDRESS 0x39 |
Ambient 17 device address setting. | |
#define | AMBIENT17_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | ambient17_return_value_t { AMBIENT17_OK = 0 , AMBIENT17_ERROR = -1 } |
Ambient 17 Click return value data. More... | |
Functions | |
void | ambient17_cfg_setup (ambient17_cfg_t *cfg) |
Ambient 17 configuration object setup function. | |
err_t | ambient17_init (ambient17_t *ctx, ambient17_cfg_t *cfg) |
Ambient 17 initialization function. | |
err_t | ambient17_default_cfg (ambient17_t *ctx) |
Ambient 17 default configuration function. | |
err_t | ambient17_generic_write (ambient17_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Ambient 17 I2C writing function. | |
err_t | ambient17_generic_read (ambient17_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Ambient 17 I2C reading function. | |
err_t | ambient17_write_register (ambient17_t *ctx, uint8_t reg, uint8_t data_in) |
Ambient 17 write register function. | |
err_t | ambient17_read_register (ambient17_t *ctx, uint8_t reg, uint8_t *data_out) |
Ambient 17 read register function. | |
err_t | ambient17_check_communication (ambient17_t *ctx) |
Ambient 17 check communication function. | |
uint8_t | ambient17_get_int_pin (ambient17_t *ctx) |
Ambient 17 get INT pin function. | |
err_t | ambient17_clear_interrupts (ambient17_t *ctx) |
Ambient 17 clear interrupts function. | |
err_t | ambient17_set_atime (ambient17_t *ctx, float atime_ms) |
Ambient 17 set atime function. | |
err_t | ambient17_set_wtime (ambient17_t *ctx, float wtime_ms) |
Ambient 17 set wtime function. | |
err_t | ambient17_set_again (ambient17_t *ctx, uint8_t again) |
Ambient 17 set again function. | |
err_t | ambient17_read_raw_data (ambient17_t *ctx, uint16_t *ch_0, uint16_t *ch_1) |
Ambient 17 read raw data function. | |
err_t | ambient17_measure_light_level (ambient17_t *ctx, uint16_t *lux) |
Ambient 17 measure light level function. | |
This file contains API for Ambient 17 Click Driver.