smoke2 2.0.0.0
|
This file contains API for Smoke 2 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | smoke2_s |
Smoke 2 Click context object. More... | |
struct | smoke2_cfg_t |
Smoke 2 Click configuration object. More... | |
Typedefs | |
typedef err_t(* | smoke2_master_io_t) (struct smoke2_s *, uint8_t, uint8_t *, uint8_t) |
Smoke 2 Click driver interface. | |
typedef struct smoke2_s | smoke2_t |
Smoke 2 Click context object. | |
Enumerations | |
enum | smoke2_drv_t { SMOKE2_DRV_SEL_SPI , SMOKE2_DRV_SEL_I2C } |
Smoke 2 Click driver selector. More... | |
enum | smoke2_return_value_t { SMOKE2_OK = 0 , SMOKE2_ERROR = -1 } |
Smoke 2 Click return value data. More... | |
Functions | |
void | smoke2_cfg_setup (smoke2_cfg_t *cfg) |
Smoke 2 configuration object setup function. | |
void | smoke2_drv_interface_selection (smoke2_cfg_t *cfg, smoke2_drv_t drv_sel) |
Smoke 2 driver interface setup function. | |
err_t | smoke2_init (smoke2_t *ctx, smoke2_cfg_t *cfg) |
Smoke 2 initialization function. | |
void | smoke2_default_cfg (smoke2_t *ctx) |
Smoke 2 default configuration function. | |
err_t | smoke2_generic_write (smoke2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Smoke 2 data writing function. | |
err_t | smoke2_generic_read (smoke2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Smoke 2 data reading function. | |
uint8_t | smoke2_get_int_pin (smoke2_t *ctx) |
Smoke 2 get state of int pin function. | |
void | smoke2_write_data (smoke2_t *ctx, uint8_t reg, uint16_t tx_data) |
Smoke 2 generic function for writing data to register function. | |
uint16_t | smoke2_read_data (smoke2_t *ctx, uint8_t reg) |
Smoke 2 generic function for reading data from registar. | |
void | smoke2_set_bit (smoke2_t *ctx, uint8_t reg, uint8_t bit_num, uint8_t val) |
Smoke 2 generic function for writing bit state. | |
uint8_t | smoke2_get_bit (smoke2_t *ctx, uint8_t reg, uint8_t bit_num) |
Smoke 2 generic function for reading bit state. | |
void | smoke2_set_mode (smoke2_t *ctx, uint8_t mode) |
Smoke 2 setting mode function. | |
void | smoke2_get_int (smoke2_t *ctx, uint8_t *fifo, uint8_t *slot_a, uint8_t *slot_b) |
Smoke 2 get mode function. | |
uint16_t | smoke2_read_sens_data (smoke2_t *ctx, uint8_t slot, uint8_t chn) |
Smoke 2 reading bit state function. | |
void | smoke2_soft_reset (smoke2_t *ctx) |
Smoke 2 reseting device function. | |
uint16_t | smoke2_smoke_calibration (smoke2_t *ctx, uint16_t threshold) |
Smoke 2 calibrating data and setting threshold function. | |
uint8_t | smoke2_check_smoke (smoke2_t *ctx) |
Smoke 2 checking smoke detection function. | |
This file contains API for Smoke 2 Click Driver.
typedef err_t(* smoke2_master_io_t) (struct smoke2_s *, uint8_t, uint8_t *, uint8_t) |
Smoke 2 Click driver interface.
Definition of driver interface of Smoke 2 Click driver. Driver serial interface.
Smoke 2 Click context object.
Context object definition of Smoke 2 Click driver.
enum smoke2_drv_t |