smoke 2.0.0.0
|
This file contains API for Smoke 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 | smoke_t |
Click ctx object definition. More... | |
struct | smoke_cfg_t |
Click configuration structure definition. More... | |
struct | smoke_set_registers_t |
Click registers object definition. More... | |
struct | smoke_set_new_value_t |
New value object definition. More... | |
Functions | |
void | smoke_cfg_setup (smoke_cfg_t *cfg) |
Config Object Initialization function. | |
SMOKE_RETVAL | smoke_init (smoke_t *ctx, smoke_cfg_t *cfg) |
Initialization function. | |
void | smoke_default_cfg (smoke_t *ctx) |
Click Default Configuration function. | |
void | smoke_write_data (smoke_t *ctx, uint8_t wr_addr, uint8_t wr_data) |
Generic write function. | |
uint8_t | smoke_read_data (smoke_t *ctx, uint8_t rd_addr) |
Generic read function. | |
void | smoke_generic_read (smoke_t *ctx, uint8_t rd_addr, uint8_t *buffer, uint8_t cnt) |
Generic read function. | |
void | smoke_set_new_value (smoke_t *ctx, smoke_set_new_value_t *new_value_data) |
Set new value function. | |
uint8_t | smoke_get_intrrupt (smoke_t *ctx, uint8_t flag) |
Get desired interrupt function. | |
uint8_t | smoke_enable_disable_interrupts (smoke_t *ctx, uint8_t interrupt_flag, uint8_t enable_flag) |
Enable or disable interrupt function. | |
uint8_t | smoke_read_device_id (smoke_t *ctx) |
Read device ID function. | |
void | smoke_reset (smoke_t *ctx) |
Reset device function. | |
float | smoke_read_temp (smoke_t *ctx) |
Read temperature in Centigrade function. | |
uint8_t | smoke_set_power (smoke_t *ctx, uint8_t state) |
I2C power setter. | |
uint8_t | smoke_set_led_mode (smoke_t *ctx, uint8_t mode) |
Enable leds. | |
uint8_t | smoke_set_adc_range (smoke_t *ctx, uint8_t adc_range) |
Set ADC range. | |
uint8_t | smoke_set_sample_rate (smoke_t *ctx, uint8_t sample_rate) |
Set sample rate. | |
uint8_t | smoke_set_pulse_width (smoke_t *ctx, uint8_t pulse_width) |
Set pulse width. | |
uint8_t | smoke_set_led_amplitude (smoke_t *ctx, uint8_t led, uint8_t amplitude) |
Set led amplitude. | |
uint8_t | smoke_set_proximity_amplitude_threshold (smoke_t *ctx, uint8_t threshold) |
Set proximity threshold. | |
uint8_t | smoke_enable_slot (smoke_t *ctx, uint8_t slot_num, uint8_t dev) |
Define slots in MultiLED mode function. | |
void | smoke_disable_slots (smoke_t *ctx) |
Disable slots in MultiLED mode function. | |
void | smoke_clear_fifo (smoke_t *ctx) |
Clearing FIFO pointers function. | |
uint8_t | smoke_get_write_ptr (smoke_t *ctx) |
Read the FIFO Write Pointer function. | |
uint8_t | smoke_get_read_ptr (smoke_t *ctx) |
Read the FIFO Read Pointer function. | |
uint8_t | smoke_set_rollover_state (smoke_t *ctx, uint8_t state) |
Set rollover state. | |
uint8_t | smoke_set_almost_full_trigger (smoke_t *ctx, uint8_t trigger_range) |
Set almost full trigger. | |
uint8_t | smoke_set_sample_avarage (smoke_t *ctx, uint8_t samples) |
Set avarage samples. | |
uint8_t | smoke_set_registers (smoke_t *ctx, smoke_set_registers_t *registers) |
Set registers values function. | |
uint8_t | smoke_read_leds (smoke_t *ctx) |
Function for reading enabled leds. | |
uint8_t | smoke_check_int (smoke_t *ctx) |
Get Interrupt state function. | |
This file contains API for Smoke Click driver.