smartdof 2.0.0.0
|
This file contains API for Smart DOF 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 | smartdof_t |
Click ctx object definition. More... | |
struct | smartdof_cfg_t |
Click configuration structure definition. More... | |
struct | smartdof_pir_t |
Click product id response definition. More... | |
struct | smartdof_rr_t |
Click FRS read response definition. More... | |
struct | smartdof_sfc_t |
Click set feature command definition. More... | |
Functions | |
void | smartdof_cfg_setup (smartdof_cfg_t *cfg) |
Config Object Initialization function. | |
SMARTDOF_RETVAL | smartdof_init (smartdof_t *ctx, smartdof_cfg_t *cfg) |
Initialization function. | |
uint8_t | smartdof_default_cfg (smartdof_t *ctx) |
Click Default Configuration function. | |
void | smartdof_i2c_write (smartdof_t *ctx, uint8_t *write_data, uint16_t n_bytes) |
Sending data bytes via I2C. | |
void | smartdof_i2c_read (smartdof_t *ctx, uint8_t *read_data, uint16_t n_bytes) |
Receiving data bytes via I2C. | |
uint8_t | smartdof_int_get (smartdof_t *ctx) |
Getting state of INT pin. | |
void | smartdof_rst_set (smartdof_t *ctx, uint8_t pin_state) |
Setting RST pin state. | |
void | smartdof_bt_set (smartdof_t *ctx, uint8_t pin_state) |
Setting BT pin state. | |
void | smartdof_device_reset (smartdof_t *ctx, uint8_t boot_mode) |
Device reset. | |
float | smartdof_q_point_to_float (int16_t sensor_data, uint8_t sensor_q_point) |
Q point (fixed point) value to float conversion. | |
void | smartdof_send_packet (smartdof_t *ctx, uint8_t channel_number, uint16_t data_length, uint8_t *packet_data) |
Sending data packet. | |
uint8_t | smartdof_receive_packet (smartdof_t *ctx, uint32_t n_cycles_timeout) |
Receiving data packet. | |
void | smartdof_get_data (smartdof_t *ctx, uint8_t *data_header, uint16_t *data_length, uint8_t *data_buffer) |
Getting received data. | |
void | smartdof_product_id_request (smartdof_t *ctx) |
Requesting product id. | |
uint8_t | smartdof_product_id_response (smartdof_t *ctx, smartdof_pir_t *pir) |
Receiving product id response. | |
void | smartdof_frs_write_request (smartdof_t *ctx, uint16_t data_length, uint16_t frs_type) |
Requesting FRS write. | |
void | smartdof_frs_write_data_request (smartdof_t *ctx, uint16_t data_offset, uint32_t *data_buffer) |
Requesting FRS write data. | |
uint8_t | smartdof_frs_write_response (smartdof_t *ctx, uint8_t *frs_status, uint16_t *data_offset) |
Receiving FRS write response. | |
void | smartdof_frs_read_request (smartdof_t *ctx, uint16_t data_offset, uint16_t frs_type, uint16_t data_size) |
Requesting FRS read. | |
uint8_t | smartdof_frs_read_response (smartdof_t *ctx, smartdof_rr_t *rr) |
Receiving FRS read response. | |
void | smartdof_command_request (smartdof_t *ctx, uint8_t command_type, uint8_t *command_parameters) |
Requesting command. | |
uint8_t | smartdof_command_response (smartdof_t *ctx, uint8_t *response_parameters) |
Receiving command response. | |
void | smartdof_get_feature_request (smartdof_t *ctx, uint8_t feature_report_id) |
Requesting get feature request. | |
void | smartdof_set_feature_command (smartdof_t *ctx, smartdof_sfc_t *sfc) |
Requesting set feature command. | |
uint8_t | smartdof_get_feature_response (smartdof_t *ctx, smartdof_sfc_t *sfc) |
Receiving get feature response. | |
void | smartdof_force_sensor_flush (smartdof_t *ctx, uint8_t sensor_id) |
Requesting force sensor flush. | |
uint8_t | smartdof_flush_completed (smartdof_t *ctx, uint8_t *sensor_id) |
Receiving flush completed response. | |
This file contains API for Smart DOF Click driver.