OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "sensor.h"
#include "sq52205.h"
#include "hal_i2c.h"
Macros | |
#define | SQ52205_CONFIG_REG_OFFSET 0x00 |
#define | SQ52205_CALIBRATION_OFFSET 0x05 |
#define | SQ52205_MASK_ENABLE_OFFSET 0x06 |
#define | SQ52205_ALERT_LIMIT_OFFSET 0x07 |
#define | SQ52205_ACCUM_CONFIG_OFFSET 0x0D |
#define | SQ52205_SHUNT_LSB 0.0000025 |
#define | SQ52205_EIN_POWER_CNT_MAX 0x10000 |
#define | SQ52205_ALERT_MASK_SHIFT_OFFSET 11 |
Functions | |
LOG_MODULE_REGISTER (dev_sq52205) | |
uint8_t | sq52205_read (sensor_cfg *cfg, int *reading) |
uint8_t | sq52205_init (sensor_cfg *cfg) |
#define SQ52205_ACCUM_CONFIG_OFFSET 0x0D |
#define SQ52205_ALERT_LIMIT_OFFSET 0x07 |
#define SQ52205_ALERT_MASK_SHIFT_OFFSET 11 |
#define SQ52205_CALIBRATION_OFFSET 0x05 |
#define SQ52205_CONFIG_REG_OFFSET 0x00 |
#define SQ52205_EIN_POWER_CNT_MAX 0x10000 |
#define SQ52205_MASK_ENABLE_OFFSET 0x06 |
#define SQ52205_SHUNT_LSB 0.0000025 |
LOG_MODULE_REGISTER | ( | dev_sq52205 | ) |
uint8_t sq52205_init | ( | sensor_cfg * | cfg | ) |
uint8_t sq52205_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |