pac1934 2.0.0.0
|
This file contains API for Pac1934 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 | pac1934_t |
Click ctx object definition. More... | |
struct | pac1934_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | pac1934_cfg_setup (pac1934_cfg_t *cfg) |
Config Object Initialization function. | |
PAC1934_RETVAL | pac1934_init (pac1934_t *ctx, pac1934_cfg_t *cfg) |
Initialization function. | |
void | pac1934_generic_write (pac1934_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | pac1934_generic_read (pac1934_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | pac1934_write_byte (pac1934_t *ctx, uint8_t wr_addr, uint8_t wr_data) |
Write one byte function. | |
uint8_t | pac1934_read_byte (pac1934_t *ctx, uint8_t rd_addr) |
Read one byte function. | |
uint16_t | pac1934_read_two_byte (pac1934_t *ctx, uint8_t rd_addr) |
Read two bytes function. | |
uint32_t | pac1934_read_four_byte (pac1934_t *ctx, uint8_t rd_addr) |
Read four bytes function. | |
void | pac1934_read_reg (pac1934_t *ctx, uint8_t reg_addr, uint8_t *output_data, uint8_t cnt) |
Read chosen number of bytes function. | |
void | pac1934_send_command (pac1934_t *ctx, uint8_t wr_cmd) |
Send Command. | |
float | pac1934_measure_voltage (pac1934_t *ctx, uint8_t channel) |
Measure Voltage function. | |
float | pac1934_measure_current (pac1934_t *ctx, uint8_t channel) |
Measure Current function. | |
float | pac1934_measure_power (pac1934_t *ctx, uint8_t channel) |
Measure Power function. | |
float | pac1934_calc_power (pac1934_t *ctx, float voltage, float amperage) |
Calculate Power function. | |
float | pac1934_measure_energy (pac1934_t *ctx, uint8_t chann, uint16_t samp_rate) |
Measure Energy function. | |
void | pac1934_dev_enable (pac1934_t *ctx) |
Enable device function. | |
void | pac1934_dev_disable (pac1934_t *ctx) |
Disable device function. | |
void | pac1934_dev_reset (pac1934_t *ctx) |
Reset device function. | |
uint8_t | pac1934_check_interrupt (pac1934_t *ctx) |
Check Interrupt function. | |
This file contains API for Pac1934 Click driver.